diff --git a/core/metadata/canonical_version.py b/core/metadata/canonical_version.py index 9871d89e..1f54a1e8 100644 --- a/core/metadata/canonical_version.py +++ b/core/metadata/canonical_version.py @@ -211,7 +211,7 @@ def pick_canonical_release( # core.library_reorganize._ALBUM_ID_COLUMNS — a test pins them in sync). A manual # match on any of these should pin/lock the canonical version (#758); a match on # a source the canonical tools don't read (e.g. lastfm) has no version to pin. -CANONICAL_ALBUM_SOURCES = frozenset({'spotify', 'itunes', 'deezer', 'discogs', 'hydrabase'}) +CANONICAL_ALBUM_SOURCES = frozenset({'spotify', 'itunes', 'deezer', 'discogs', 'hydrabase', 'musicbrainz'}) def should_pin_manual_canonical(entity_type: str, source: str) -> bool: diff --git a/tests/test_canonical_manual_lock.py b/tests/test_canonical_manual_lock.py index ad9fd99e..54f9bcea 100644 --- a/tests/test_canonical_manual_lock.py +++ b/tests/test_canonical_manual_lock.py @@ -24,7 +24,7 @@ from database.music_database import MusicDatabase # should_pin_manual_canonical — pure # --------------------------------------------------------------------------- -@pytest.mark.parametrize('source', ['spotify', 'itunes', 'deezer', 'discogs', 'hydrabase']) +@pytest.mark.parametrize('source', ['spotify', 'itunes', 'deezer', 'discogs', 'hydrabase', 'musicbrainz']) def test_pins_album_on_recognised_source(source): assert should_pin_manual_canonical('album', source) is True @@ -34,7 +34,7 @@ def test_does_not_pin_non_album(entity): assert should_pin_manual_canonical(entity, 'spotify') is False -@pytest.mark.parametrize('source', ['lastfm', 'genius', 'musicbrainz', 'audiodb', 'tidal']) +@pytest.mark.parametrize('source', ['lastfm', 'genius', 'audiodb', 'tidal']) def test_does_not_pin_source_canonical_cant_read(source): # No album-version data the canonical tools read → nothing to pin. assert should_pin_manual_canonical('album', source) is False