From 21dd8d95e800c722eeb2c418d6176b1cd85e36c0 Mon Sep 17 00:00:00 2001 From: Matt Date: Fri, 15 May 2020 19:07:45 -0400 Subject: [PATCH 1/2] Add music to addon menu --- jellyfin_kodi/entrypoint/default.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/jellyfin_kodi/entrypoint/default.py b/jellyfin_kodi/entrypoint/default.py index eab81ff3..97222f6a 100644 --- a/jellyfin_kodi/entrypoint/default.py +++ b/jellyfin_kodi/entrypoint/default.py @@ -160,14 +160,7 @@ def listing(): LOG.debug("--[ listing/%s/%s ] %s", node, label, path) if path: - if xbmc.getCondVisibility('Window.IsActive(Pictures)') and node in ('photos', 'homevideos'): - directory(label, path, artwork=artwork) - elif xbmc.getCondVisibility('Window.IsActive(Videos)') and node not in ('photos', 'music', 'audiobooks'): - directory(label, path, artwork=artwork, context=context) - elif xbmc.getCondVisibility('Window.IsActive(Music)') and node in ('music'): - directory(label, path, artwork=artwork, context=context) - elif not xbmc.getCondVisibility('Window.IsActive(Videos) | Window.IsActive(Pictures) | Window.IsActive(Music)'): - directory(label, path, artwork=artwork) + directory(label, path, artwork=artwork, context=context) for server in servers: context = [] From 14257f2a302e72c7d834ebfd6c80075c3a6080ea Mon Sep 17 00:00:00 2001 From: Matt Date: Fri, 15 May 2020 19:15:01 -0400 Subject: [PATCH 2/2] Only show playlists once --- jellyfin_kodi/views.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/jellyfin_kodi/views.py b/jellyfin_kodi/views.py index 74504ebf..4f43992f 100644 --- a/jellyfin_kodi/views.py +++ b/jellyfin_kodi/views.py @@ -166,14 +166,11 @@ class Views(object): def get_libraries(self): try: - libraries = self.server.jellyfin.get_media_folders()['Items'] - views = self.server.jellyfin.get_views()['Items'] + libraries = self.server.jellyfin.get_views()['Items'] except Exception as error: LOG.exception(error) raise IndexError("Unable to retrieve libraries: %s" % error) - libraries.extend([x for x in views if x['Id'] not in [y['Id'] for y in libraries]]) - return libraries def get_views(self):