Skip to content

Commit

Permalink
Jellyfin: Fix regression importing track artist mapping (#1339)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jc2k authored Jun 10, 2024
1 parent 892a6f6 commit 05bfaf5
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions music_assistant/server/providers/jellyfin/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -446,14 +446,15 @@ async def _parse_track(self, jellyfin_track: dict[str, Any]) -> Track:
parent_album = API.get_item(
self._jellyfin_server.jellyfin, current_jellyfin_track[ITEM_KEY_ALBUM_ID]
)
if ITEM_KEY_ALBUM_ID in parent_album and ITEM_KEY_ALBUM_ARTIST in parent_album:
track.artists.append(
self._get_item_mapping(
MediaType.ARTIST,
parent_album[ITEM_KEY_ALBUM_ID],
parent_album[ITEM_KEY_ALBUM_ARTIST],
if ITEM_KEY_ALBUM_ARTISTS in parent_album:
for artist_item in parent_album[ITEM_KEY_ALBUM_ARTISTS]:
track.artists.append(
self._get_item_mapping(
MediaType.ARTIST,
artist_item[ITEM_KEY_ID],
artist_item[ITEM_KEY_NAME],
)
)
)
else:
track.artists.append(await self._parse_artist(name=VARIOUS_ARTISTS_NAME))
else:
Expand Down

0 comments on commit 05bfaf5

Please sign in to comment.