Skip to content

Commit

Permalink
Youtube Music: Fix artist missing on compilation albums (#403)
Browse files Browse the repository at this point in the history
Fix artist missing on compilation albums
  • Loading branch information
marcelveldt authored Jul 9, 2022
1 parent 40028bd commit 47edb98
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion music_assistant/music_providers/ytmusic/ytmusic.py
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,10 @@ async def _parse_album(self, album_obj: dict, album_id: str) -> Album:
album.artists = [
await self._parse_artist(artist)
for artist in album_obj["artists"]
if artist.get("id")
# artist object may be missing an id
# in that case its either a performer (like the composer) OR this
# is a Various artists compilation album...
if (artist.get("id") or artist["name"] == "Various Artists")
]
if "type" in album_obj:
if album_obj["type"] == "Single":
Expand Down

0 comments on commit 47edb98

Please sign in to comment.