Find album art by MusicBrainz ID (SCR-6)
CI / lint (push) Successful in 16s
CI / validate-monitoring (push) Successful in 21s
CI / federation-interop (push) Successful in 1m20s
CI / test (push) Successful in 5m50s
CI / images (push) Skipped
CI / assets (push) Skipped
CI / python-package (push) Skipped
CI / trigger-deploy (push) Skipped
CI / notify (push) Successful in 9s

Corrections accept a release MBID as well as a release-group MBID, and the
worker uses a scrobble's recording MBID to find the release-group before falling
back to the text search. Counts matched/missed recording lookups.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
mattandClaude Sonnet 5.5 committed 2026-10-06 23:37:54 +01:00
1 parent ad383b602e
commit 2c4c42a42b
9 files changed
+250 -28

No files matched your search

+14 -2
View File
@@ -176,11 +176,22 @@ class AlbumArtCorrectionSchema(AlbumArtArgsSchema):
release_group_mbid = fields.UUID(
metadata={"description": "A MusicBrainz release-group ID; skips the search"}
)
release_mbid = fields.UUID(
metadata={
"description": "A MusicBrainz release ID, as an alternative to a release-group ID; "
"skips the search"
}
)
@validates_schema
def _needs_a_correction(self, data, **kwargs):
if not any(k in data for k in ("search_artist", "search_album", "release_group_mbid")):
raise ValidationError("Give a search_artist, search_album or release_group_mbid")
ids = ("release_group_mbid", "release_mbid")
if not any(k in data for k in ("search_artist", "search_album", *ids)):
raise ValidationError(
"Give a search_artist, search_album, release_group_mbid or release_mbid"
)
if all(k in data for k in ids):
raise ValidationError("Give a release_group_mbid or a release_mbid, not both")
class AlbumArtOverrideSchema(Schema):
@@ -190,6 +201,7 @@ class AlbumArtOverrideSchema(Schema):
search_artist = fields.String(allow_none=True)
search_album = fields.String(allow_none=True)
release_group_mbid = fields.String(allow_none=True)
release_mbid = fields.String(allow_none=True)
class AlbumArtFailureSchema(Schema):