From 0e4bdfd0062ce3f5d3fcd33fdee7380b52e9296a Mon Sep 17 00:00:00 2001 From: Matt Date: Sat, 17 Oct 2020 12:47:57 -0400 Subject: [PATCH] Only show favorite playlists if they have contents --- mopidy_jellyfin/playlists.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/mopidy_jellyfin/playlists.py b/mopidy_jellyfin/playlists.py index a45f4d0..a0028c2 100644 --- a/mopidy_jellyfin/playlists.py +++ b/mopidy_jellyfin/playlists.py @@ -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