Skip to content

Commit

Permalink
Merge pull request #94 from mcarlton00/empty-favorites
Browse files Browse the repository at this point in the history
Only show favorite playlists if they have contents
  • Loading branch information
mcarlton00 authored Oct 17, 2020
2 parents 3b710a3 + 0e4bdfd commit 1d929d2
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions mopidy_jellyfin/playlists.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,9 @@ def favorites(self):
favorite_playlists = self.backend.remote.get_favorites()

for name, contents in favorite_playlists.items():
uri = f'jellyfin:playlist:favorite-{name}'
playlists[uri] = Playlist(
uri=uri, name=f'Favorites - {name}', tracks=contents)
if contents:
uri = f'jellyfin:playlist:favorite-{name}'
playlists[uri] = Playlist(
uri=uri, name=f'Favorites - {name}', tracks=contents)

return playlists

0 comments on commit 1d929d2

Please sign in to comment.