Get title from MB album lookup
This commit is contained in:
@ -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"],
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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}")
|
||||||
|
|||||||
Reference in New Issue
Block a user