fix keyerror
authorMarcel van der Veldt <m.vanderveldt@outlook.com>
Sat, 13 Feb 2021 13:26:30 +0000 (14:26 +0100)
committerMarcel van der Veldt <m.vanderveldt@outlook.com>
Sat, 13 Feb 2021 13:26:30 +0000 (14:26 +0100)
music_assistant/providers/spotify/__init__.py

index 6ca2641d46bd7502488f093f8a0244aa592c2452..d1642a0b802f16ca499f52db795114a042ba45d6 100644 (file)
@@ -234,7 +234,7 @@ class SpotifyProvider(MusicProvider):
             for item in await self.__async_get_all_items(
                 f"playlists/{prov_playlist_id}/tracks"
             )
-            if (item and item["track"]["id"])
+            if (item and item["track"] and item["track"]["id"])
         ]
 
     async def async_get_artist_albums(self, prov_artist_id) -> List[Album]: