Merge pull request #297 from mcarlton00/addon-menu

Improve addon menu
This commit is contained in:
Abby 2020-05-16 17:45:15 +01:00 committed by GitHub
commit 4b679eab74
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 12 deletions

View File

@ -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 = []

View File

@ -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):