From 2661c54938e7ad686fe3f2f4e418b0ccc7fd84c7 Mon Sep 17 00:00:00 2001 From: marcelveldt Date: Mon, 18 Jan 2016 20:48:44 +0100 Subject: [PATCH] fix entrypoints --- default.py | 1 + resources/lib/entrypoint.py | 10 ++++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/default.py b/default.py index c482c918..c5588861 100644 --- a/default.py +++ b/default.py @@ -35,6 +35,7 @@ class Main: # Parse parameters base_url = sys.argv[0] addon_handle = int(sys.argv[1]) + print sys.argv[2] params = urlparse.parse_qs(sys.argv[2][1:]) xbmc.log("Parameter string: %s" % sys.argv[2]) try: diff --git a/resources/lib/entrypoint.py b/resources/lib/entrypoint.py index e901df18..391cb7ac 100644 --- a/resources/lib/entrypoint.py +++ b/resources/lib/entrypoint.py @@ -69,10 +69,12 @@ def doMainListing(): label = utils.window('Emby.nodes.%s.title' % i) type = utils.window('Emby.nodes.%s.type' % i) #because we do not use seperate entrypoints for each content type, we need to figure out which items to show in each listing. - #if skinshortcuts is active, we just show all nodes - if path and ((xbmc.getCondVisibility("Window.IsActive(Pictures)") and type=="photos") - or (xbmc.getCondVisibility("Window.IsActive(VideoLibrary)") and type != "photos") - or xbmc.getCondVisibility("Window.IsActive(script-skinshortcuts.xml)")): + #for now we just only show picture nodes in the picture librarym video nodes in the video library and all nodes in any other window + if path and xbmc.getCondVisibility("Window.IsActive(Pictures)") and type == "photos": + addDirectoryItem(label, path) + elif path and xbmc.getCondVisibility("Window.IsActive(VideoLibrary)") and type != "photos": + addDirectoryItem(label, path) + elif path and not xbmc.getCondVisibility("Window.IsActive(VideoLibrary) | Window.IsActive(Pictures) | Window.IsActive(MusicLibrary)"): addDirectoryItem(label, path) # some extra entries for settings and stuff. TODO --> localize the labels