Skip to content

Commit

Permalink
Jellyfin: Skip tracks with no MediaStreams (music-assistant#1469)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jc2k authored Jul 7, 2024
1 parent 52db2f5 commit 24af8df
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions music_assistant/server/providers/jellyfin/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,11 @@ async def get_library_tracks(self) -> AsyncGenerator[Track, None]:
fields=TRACK_FIELDS,
)
for track in response["Items"]:
if not len(track[ITEM_KEY_MEDIA_STREAMS]):
self.logger.warning(
"Invalid track %s: Does not have any media streams", track[ITEM_KEY_NAME]
)
continue
yield parse_track(self.logger, self.instance_id, self._client, track)

while offset < response["TotalRecordCount"]:
Expand Down

0 comments on commit 24af8df

Please sign in to comment.