Get title from MB album lookup

This commit is contained in:
2023-03-14 12:57:20 -04:00
parent 6dee409a55
commit 7d7ec4b676
2 changed files with 2 additions and 1 deletions

View File

@ -68,6 +68,7 @@ def lookup_album_dict_from_mb(release_name: str, artist_name: str) -> dict:
return { return {
"year": year, "year": year,
"title": top_result["title"],
"mb_id": top_result["id"], "mb_id": top_result["id"],
"mb_group_id": top_result["release-group"]["id"], "mb_group_id": top_result["release-group"]["id"],
} }

View File

@ -46,7 +46,7 @@ def get_or_create_album(
album = None album = None
album_dict = lookup_album_dict_from_mb(name, artist_name=artist.name) album_dict = lookup_album_dict_from_mb(name, artist_name=artist.name)
name = name or album_dict["name"] name = name or album_dict["title"]
mbid = mbid or album_dict["mb_id"] mbid = mbid or album_dict["mb_id"]
logger.debug(f"Looking up album {name} and mbid: {mbid}") logger.debug(f"Looking up album {name} and mbid: {mbid}")