feat: MBTarget exposes rgMbid + artistMbid from the resolver

This commit is contained in:
Jonathan
2026-07-11 16:54:11 +02:00
parent f421904c9b
commit 446d54f819
4 changed files with 18 additions and 1 deletions
+6 -1
View File
@@ -36,9 +36,12 @@ class MusicBrainzResolver:
canonical_album = rg.get("title", album)
canonical_artist = artist
artist_mbid = ""
credit = rg.get("artist-credit")
if isinstance(credit, list) and credit and isinstance(credit[0], dict):
canonical_artist = (credit[0].get("artist") or {}).get("name", artist)
_artist = credit[0].get("artist") or {}
canonical_artist = _artist.get("name", artist)
artist_mbid = _artist.get("id", "") or ""
year = None
frd = rg.get("first-release-date", "") or ""
@@ -72,4 +75,6 @@ class MusicBrainzResolver:
total_duration_s=total_duration_s,
year=year,
tracklist=titles,
rg_mbid=rg.get("id", "") or "",
artist_mbid=artist_mbid,
)