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
+14
View File
@@ -25,6 +25,20 @@ def test_discover_auto_monitor_future_only_flags_new(conn):
assert _monitored_map(conn) == {"rg-old": False, "rg-new": True} # only the future one is monitored
def test_discover_auto_monitor_skips_non_core_releases(conn):
# autoMonitorFuture must only auto-flag *core* studio releases; a new live album or
# compilation is recorded (unmonitored) but never auto-monitored.
insert_watched_artist(conn, mbid="a1", name="X", auto_monitor_future=True)
releases = [
ReleaseGroupInfo("rg-studio", "Studio", "Album", (), "2999-01-01"),
ReleaseGroupInfo("rg-live", "Live", "Album", ("Live",), "2999-02-01"),
ReleaseGroupInfo("rg-comp", "Best Of", "Album", ("Compilation",), "2999-03-01"),
]
browser = FakeMbBrowser(releases={"a1": releases})
discover(conn, browser, MonitorConfig(enabled=True))
assert _monitored_map(conn) == {"rg-studio": True, "rg-live": False, "rg-comp": False}
def test_discover_default_off_monitors_nothing(conn):
insert_watched_artist(conn, mbid="a1", name="X", auto_monitor_future=False)
browser = FakeMbBrowser(releases={"a1": _releases()})