From 9468adfbe36c21a86bb9d78577f020f218305174 Mon Sep 17 00:00:00 2001 From: marcelveldt Date: Wed, 6 Jan 2016 08:51:46 +0100 Subject: [PATCH 1/7] fix smart shortcuts compatability --- resources/lib/videonodes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/lib/videonodes.py b/resources/lib/videonodes.py index 8cb20d64..3fa83641 100644 --- a/resources/lib/videonodes.py +++ b/resources/lib/videonodes.py @@ -172,7 +172,7 @@ class VideoNodes(object): path = "plugin://plugin.video.emby/?id=%s&mode=inprogressepisodes&limit=25"% tagname else: path = "library://video/Emby - %s/%s_%s.xml" % (dirname, cleantagname, nodetype) - windowpath = "ActivateWindow(Video, %s, return)" % path + windowpath = "ActivateWindow(Video,%s,return)" % path if nodetype == "all": From 6adc42293672ebef1a1d50d0b585395108a57c3b Mon Sep 17 00:00:00 2001 From: marcelveldt Date: Wed, 6 Jan 2016 08:59:41 +0100 Subject: [PATCH 2/7] fix next episodes emby node --- resources/lib/videonodes.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/lib/videonodes.py b/resources/lib/videonodes.py index 3fa83641..746aac87 100644 --- a/resources/lib/videonodes.py +++ b/resources/lib/videonodes.py @@ -116,7 +116,7 @@ class VideoNodes(object): '4': "inprogress", '5': "inprogressepisodes", '6': "unwatched", - '7': "nextupepisodes", + '7': "nextepisodes", '8': "sets", '9': "genres", '10': "random", @@ -161,7 +161,7 @@ class VideoNodes(object): label = stringid # Set window properties - if nodetype == "nextupepisodes": + if nodetype == "nextepisodes": # Custom query path = "plugin://plugin.video.emby/?id=%s&mode=nextup&limit=25" % tagname elif kodiversion == 14 and nodetype == "recentepisodes": @@ -198,7 +198,7 @@ class VideoNodes(object): # Create the root - if nodetype == "nextupepisodes" or (kodiversion == 14 and + if nodetype == "nextepisodes" or (kodiversion == 14 and nodetype in ('recentepisodes', 'inprogressepisodes')): # Folder type with plugin path root = self.commonRoot(order=node, label=label, tagname=tagname, roottype=2) From 5ce7e3407d390e5eb9c81f0d76b87fadb0252729 Mon Sep 17 00:00:00 2001 From: shaun Date: Wed, 6 Jan 2016 20:08:16 +1100 Subject: [PATCH 3/7] fix video node window path --- resources/lib/videonodes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/lib/videonodes.py b/resources/lib/videonodes.py index 746aac87..53af40b5 100644 --- a/resources/lib/videonodes.py +++ b/resources/lib/videonodes.py @@ -277,7 +277,7 @@ class VideoNodes(object): nodepath = xbmc.translatePath("special://profile/library/video/").decode('utf-8') nodeXML = "%semby_%s.xml" % (nodepath, cleantagname) path = "library://video/emby_%s.xml" % (cleantagname) - windowpath = "ActivateWindow(Video, %s, return)" % path + windowpath = "ActivateWindow(Video,%s,return)" % path # Create the video node directory if not xbmcvfs.exists(nodepath): From f5c2aaa49075ce31a5ba4e69601df6393b4c341d Mon Sep 17 00:00:00 2001 From: shaun Date: Wed, 6 Jan 2016 20:23:48 +1100 Subject: [PATCH 4/7] bump ver --- addon.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addon.xml b/addon.xml index b97f17cf..4a22514e 100644 --- a/addon.xml +++ b/addon.xml @@ -1,7 +1,7 @@ From fc810f7b320df1978089654c359188fcbfbe00c9 Mon Sep 17 00:00:00 2001 From: marcelveldt Date: Wed, 6 Jan 2016 23:22:10 +0100 Subject: [PATCH 5/7] fix extrafanart issues --- default.py | 7 ++++--- resources/lib/entrypoint.py | 29 ++++++++++++++++------------- 2 files changed, 20 insertions(+), 16 deletions(-) diff --git a/default.py b/default.py index ad47a828..826dfdf3 100644 --- a/default.py +++ b/default.py @@ -37,7 +37,6 @@ class Main: addon_handle = int(sys.argv[1]) params = urlparse.parse_qs(sys.argv[2][1:]) xbmc.log("Parameter string: %s" % sys.argv[2]) - try: mode = params['mode'][0] itemid = params.get('id') @@ -51,6 +50,7 @@ class Main: modes = { 'reset': utils.reset, + 'extrafanart': entrypoint.getExtraFanArt(), 'resetauth': entrypoint.resetAuth, 'play': entrypoint.doPlayback, 'passwords': utils.passwordsXML, @@ -63,6 +63,9 @@ class Main: 'recentepisodes': entrypoint.getRecentEpisodes, 'refreshplaylist': entrypoint.refreshPlaylist } + + if "extrafanart" in sys.argv[0]: + entrypoint.getExtraFanArt() if modes.get(mode): # Simple functions @@ -101,8 +104,6 @@ class Main: elif mode == "texturecache": import artwork artwork.Artwork().FullTextureCacheSync() - elif "extrafanart" in sys.argv[0]: - entrypoint.getExtraFanArt() else: entrypoint.doMainListing() diff --git a/resources/lib/entrypoint.py b/resources/lib/entrypoint.py index cc00eada..08d5ff63 100644 --- a/resources/lib/entrypoint.py +++ b/resources/lib/entrypoint.py @@ -817,24 +817,27 @@ def getExtraFanArt(): emby = embyserver.Read_EmbyServer() art = artwork.Artwork() + embyId = "" # Get extrafanart for listitem - # this will only be used for skins that actually call the listitem's path + fanart dir... + # will be called by skinhelper script to get the extrafanart try: - # Only do this if the listitem has actually changed - itemPath = xbmc.getInfoLabel("ListItem.FileNameAndPath") - - if not itemPath: + # for tvshows we get the embyid just from the path + if xbmc.getCondVisibility("Container.Content(tvshows) | Container.Content(seasons) | Container.Content(episodes)"): itemPath = xbmc.getInfoLabel("ListItem.Path") - - if any([x in itemPath for x in ['tvshows', 'musicvideos', 'movies']]): - params = urlparse.parse_qs(itemPath) - try: - embyId = params['id'][0] - except KeyError: + if "plugin.video.emby" in itemPath: embyId = itemPath.split("/")[-2] - - utils.logMsg("EMBY", "Requesting extrafanart for Id: %s" % embyId, 1) + else: + #for movies we grab the emby id from the params + itemPath = xbmc.getInfoLabel("ListItem.FileNameAndPath") + if "plugin.video.emby" in itemPath: + params = urlparse.parse_qs(itemPath) + embyId = params.get('id') + if embyId: embyId = embyId[0] + + if embyId: + #only proceed if we actually have a emby id + utils.logMsg("EMBY", "Requesting extrafanart for Id: %s" % embyId, 0) # We need to store the images locally for this to work # because of the caching system in xbmc From dfc293a21a1d100c16e0f5b794cdbfecfcad4f16 Mon Sep 17 00:00:00 2001 From: angelblue05 Date: Thu, 7 Jan 2016 05:05:15 -0600 Subject: [PATCH 6/7] Extrafanart No need for it to be in modes as the method is called individually. --- default.py | 1 - 1 file changed, 1 deletion(-) diff --git a/default.py b/default.py index 826dfdf3..ea4e676d 100644 --- a/default.py +++ b/default.py @@ -50,7 +50,6 @@ class Main: modes = { 'reset': utils.reset, - 'extrafanart': entrypoint.getExtraFanArt(), 'resetauth': entrypoint.resetAuth, 'play': entrypoint.doPlayback, 'passwords': utils.passwordsXML, From 54ee51232ff2493ca5e9fffefd9e73039f034d68 Mon Sep 17 00:00:00 2001 From: angelblue05 Date: Thu, 7 Jan 2016 07:27:10 -0600 Subject: [PATCH 7/7] Update default.py --- default.py | 1 + 1 file changed, 1 insertion(+) diff --git a/default.py b/default.py index ea4e676d..b3f8190a 100644 --- a/default.py +++ b/default.py @@ -51,6 +51,7 @@ class Main: 'reset': utils.reset, 'resetauth': entrypoint.resetAuth, + 'extrafanart': entrypoint.getExtraFanArt, 'play': entrypoint.doPlayback, 'passwords': utils.passwordsXML, 'adduser': entrypoint.addUser,