Переглянути джерело

Get title from MB album lookup

Colin Powell 2 роки тому
батько
коміт
7d7ec4b676
2 змінених файлів з 2 додано та 1 видалено
  1. 1 0
      vrobbler/apps/music/musicbrainz.py
  2. 1 1
      vrobbler/apps/music/utils.py

+ 1 - 0
vrobbler/apps/music/musicbrainz.py

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

+ 1 - 1
vrobbler/apps/music/utils.py

@@ -46,7 +46,7 @@ def get_or_create_album(
     album = None
     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"]
 
     logger.debug(f"Looking up album {name} and mbid: {mbid}")