From 7e971ab6475abe931ca7665e06eeb3b3abafff86 Mon Sep 17 00:00:00 2001 From: Antoine V Date: Thu, 21 Dec 2023 00:02:03 +0100 Subject: [PATCH] Fixed theaudiodb provider with get_track_metadata issue (#969) --- music_assistant/server/providers/theaudiodb/__init__.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/music_assistant/server/providers/theaudiodb/__init__.py b/music_assistant/server/providers/theaudiodb/__init__.py index 681a9e13b..8e8db563c 100644 --- a/music_assistant/server/providers/theaudiodb/__init__.py +++ b/music_assistant/server/providers/theaudiodb/__init__.py @@ -144,7 +144,6 @@ async def get_album_metadata(self, album: Album) -> MediaItemMetadata | None: async def get_track_metadata(self, track: Track) -> MediaItemMetadata | None: """Retrieve metadata for track on theaudiodb.""" - adb_track = None if track.mbid: result = await self._get_data("track-mb.php", i=track.mbid) if result and result.get("track"): @@ -167,7 +166,7 @@ async def get_track_metadata(self, track: Track) -> MediaItemMetadata | None: if not compare_strings(track_artist.name, item["strArtist"]): continue if compare_strings(track_name, item["strTrack"]): - return self.__parse_track(adb_track) + return self.__parse_track(item) return None def __parse_artist(self, artist_obj: dict[str, Any]) -> MediaItemMetadata: