feat(library): ignore a release (do-not-monitor)
Add MonitoredRelease.ignored (migration add_release_ignored). The monitor's enqueue_due skips ignored releases, and they drop off the Wanted list — independent of `monitored`, so auto-monitor-future can't silently re-grab an album the user chose to ignore. - Worker enqueue_due: AND NOT mr.ignored. - /api/releases/[id] PATCH now accepts `ignored`; /api/wanted filters it out; artist detail exposes `ignored`. - UI: Ignore button on Wanted rows; discography shows an "Ignored" badge with an Ignore/Un-ignore toggle (monitor + search disabled while ignored). Worker + web tests added. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -38,6 +38,15 @@ def test_skips_unmonitored_and_fulfilled(conn):
|
||||
assert enqueue_due(conn, CFG) == 0
|
||||
|
||||
|
||||
def test_skips_ignored_release(conn):
|
||||
rel_id = insert_monitored_release(conn, rg_mbid="rg-ig", monitored=True, state="wanted")
|
||||
with conn.cursor() as cur:
|
||||
cur.execute('UPDATE "MonitoredRelease" SET ignored = true WHERE id = %s', (rel_id,))
|
||||
conn.commit()
|
||||
assert enqueue_due(conn, CFG) == 0 # ignored → never enqueued even though monitored+wanted
|
||||
assert _job_count_for(conn, rel_id) == 0
|
||||
|
||||
|
||||
def test_skips_when_recently_searched(conn):
|
||||
insert_monitored_release(conn, rg_mbid="rg-1", monitored=True, state="wanted",
|
||||
last_searched_sql="now() - interval '1 hour'") # < 6h retry
|
||||
|
||||
Reference in New Issue
Block a user