diff --git a/resources/lib/entrypoint.py b/resources/lib/entrypoint.py index 2338a512..4e0df93e 100644 --- a/resources/lib/entrypoint.py +++ b/resources/lib/entrypoint.py @@ -68,7 +68,11 @@ def doMainListing(): path = utils.window('Emby.nodes.%s.content' % i) label = utils.window('Emby.nodes.%s.title' % i) type = utils.window('Emby.nodes.%s.type' % i) - if path and ((xbmc.getCondVisibility("Window.IsActive(Pictures)") and type=="photos") or (xbmc.getCondVisibility("Window.IsActive(VideoLibrary)") and type != "photos")): + #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)")): addDirectoryItem(label, path) # some extra entries for settings and stuff. TODO --> localize the labels diff --git a/resources/lib/utils.py b/resources/lib/utils.py index aca6b790..7b69bb79 100644 --- a/resources/lib/utils.py +++ b/resources/lib/utils.py @@ -57,12 +57,15 @@ def settings(setting, value=None): if value is not None: addon.setSetting(setting, value) else: - return addon.getSetting(setting) + return addon.getSetting(setting) #returns unicode object def language(stringid): # Central string retrieval addon = xbmcaddon.Addon(id='plugin.video.emby') - string = addon.getLocalizedString(stringid) + string = addon.getLocalizedString(stringid) #returns unicode object + if isinstance(string, unicode): print "EMBY LANGUAGE STRING IS UNICODE !" + elif isinstance(string, txt): print "EMBY LANGUAGE STRING IS TEXT !" + else: print "EMBY LANGUAGE STRING IS UNKNOWN !" return string