fix(monitor): only auto-monitor core studio releases

autoMonitorFuture flagged any new release, so it could auto-monitor a
newly-released live album or compilation. Gate it on is_core_release so
auto-monitoring matches the studio-only default the UI shows.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Jonathan
2026-07-12 10:42:42 +02:00
parent 33a1ed9cc4
commit 830de07997
2 changed files with 20 additions and 1 deletions
+6 -1
View File
@@ -4,6 +4,7 @@ from datetime import date, datetime
import psycopg
from lyra_worker.browser import MbBrowser
from lyra_worker.release_filter import is_core_release
_TRUE = {"1", "true", "yes", "on"}
@@ -58,7 +59,11 @@ def discover(conn: psycopg.Connection, browser: MbBrowser, cfg: MonitorConfig) -
inserted = 0
for artist_id, mbid, name, auto_future, monitor_from in artists:
for rg in browser.browse_release_groups(mbid):
monitored = bool(auto_future) and _is_new(rg.first_release_date, monitor_from)
monitored = (
bool(auto_future)
and _is_new(rg.first_release_date, monitor_from)
and is_core_release(rg.primary_type, rg.secondary_types)
)
with conn.cursor() as cur:
cur.execute(
'INSERT INTO "MonitoredRelease" (id, "watchedArtistId", "artistMbid", '