From 3da9e5ddbd84ce5a390e4f5eaef8d2310ca7fb1a Mon Sep 17 00:00:00 2001 From: xnappo Date: Sun, 28 Jun 2015 21:56:57 -0500 Subject: [PATCH 01/13] Version bump --- addon.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addon.xml b/addon.xml index ffe99310..1de55753 100644 --- a/addon.xml +++ b/addon.xml @@ -1,7 +1,7 @@ From 9635d2f0d33f7eb271326cdd92545ac3ea419cf1 Mon Sep 17 00:00:00 2001 From: angelblue05 Date: Mon, 29 Jun 2015 07:39:45 -0500 Subject: [PATCH 02/13] Revert "getdirectory error" This reverts commit ff3041d1045adcdea8632805b9d7e7864d05bc88. --- resources/lib/Entrypoint.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/resources/lib/Entrypoint.py b/resources/lib/Entrypoint.py index 02556930..8500748e 100644 --- a/resources/lib/Entrypoint.py +++ b/resources/lib/Entrypoint.py @@ -650,12 +650,12 @@ def doMainListing(): addDirectoryItem(label, path) # some extra entries for settings and stuff. TODO --> localize the labels - addDirectoryItem("Settings", "plugin://plugin.video.emby/?mode=settings", False) - addDirectoryItem("Perform manual sync", "plugin://plugin.video.emby/?mode=manualsync", False) - addDirectoryItem("Add user to session", "plugin://plugin.video.emby/?mode=adduser", False) - addDirectoryItem("Configure user preferences", "plugin://plugin.video.emby/?mode=userprefs", False) - addDirectoryItem("Perform local database reset (full resync)", "plugin://plugin.video.emby/?mode=reset", False) - addDirectoryItem("Cache all images to Kodi texture cache (advanced)", "plugin://plugin.video.emby/?mode=texturecache", False) - addDirectoryItem("Sync Emby Theme Media to Kodi", "plugin://plugin.video.emby/?mode=thememedia", False) + addDirectoryItem("Settings", "plugin://plugin.video.emby/?mode=settings") + addDirectoryItem("Perform manual sync", "plugin://plugin.video.emby/?mode=manualsync") + addDirectoryItem("Add user to session", "plugin://plugin.video.emby/?mode=adduser") + addDirectoryItem("Configure user preferences", "plugin://plugin.video.emby/?mode=userprefs") + addDirectoryItem("Perform local database reset (full resync)", "plugin://plugin.video.emby/?mode=reset") + addDirectoryItem("Cache all images to Kodi texture cache (advanced)", "plugin://plugin.video.emby/?mode=texturecache") + addDirectoryItem("Sync Emby Theme Media to Kodi", "plugin://plugin.video.emby/?mode=thememedia") xbmcplugin.endOfDirectory(int(sys.argv[1])) From ef926f94e2a81f8d258884626264a18c275ee7d1 Mon Sep 17 00:00:00 2001 From: angelblue05 Date: Mon, 29 Jun 2015 08:51:14 -0500 Subject: [PATCH 03/13] Revert "Support alternate address" This reverts commit 193ae44417fd543c3b6494e6c616faded8a9564f. --- resources/lib/UserClient.py | 4 ---- resources/settings.xml | 4 +--- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/resources/lib/UserClient.py b/resources/lib/UserClient.py index 0f97d516..8cc363ab 100644 --- a/resources/lib/UserClient.py +++ b/resources/lib/UserClient.py @@ -96,10 +96,6 @@ class UserClient(threading.Thread): HTTPS = addon.getSetting('https') host = addon.getSetting('ipaddress') port = addon.getSetting('port') - # Alternate host - if addon.getSetting('altip') == "true": - host = addon.getSetting('secondipaddress') - server = host + ":" + port if host == "": diff --git a/resources/settings.xml b/resources/settings.xml index 32a2d37f..fd9facd4 100644 --- a/resources/settings.xml +++ b/resources/settings.xml @@ -2,9 +2,7 @@ - - - + From 7562d605e8608083708de98a841b1b23bc20d3d5 Mon Sep 17 00:00:00 2001 From: angelblue05 Date: Mon, 29 Jun 2015 08:56:01 -0500 Subject: [PATCH 04/13] Version bump 1.1.1 --- addon.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addon.xml b/addon.xml index 1de55753..9ad04501 100644 --- a/addon.xml +++ b/addon.xml @@ -1,7 +1,7 @@ From 385c3cae7e593ce6c17268f906502f5bdd0ffd74 Mon Sep 17 00:00:00 2001 From: angelblue05 Date: Mon, 29 Jun 2015 09:09:29 -0500 Subject: [PATCH 05/13] Revert "Revert "Support alternate address"" This reverts commit ef926f94e2a81f8d258884626264a18c275ee7d1. --- resources/lib/UserClient.py | 4 ++++ resources/settings.xml | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/resources/lib/UserClient.py b/resources/lib/UserClient.py index 8cc363ab..0f97d516 100644 --- a/resources/lib/UserClient.py +++ b/resources/lib/UserClient.py @@ -96,6 +96,10 @@ class UserClient(threading.Thread): HTTPS = addon.getSetting('https') host = addon.getSetting('ipaddress') port = addon.getSetting('port') + # Alternate host + if addon.getSetting('altip') == "true": + host = addon.getSetting('secondipaddress') + server = host + ":" + port if host == "": diff --git a/resources/settings.xml b/resources/settings.xml index fd9facd4..32a2d37f 100644 --- a/resources/settings.xml +++ b/resources/settings.xml @@ -2,7 +2,9 @@ - + + + From c71e5eb29358ee10261ab974e6dde0f1d551409e Mon Sep 17 00:00:00 2001 From: angelblue05 Date: Mon, 29 Jun 2015 11:40:29 -0500 Subject: [PATCH 06/13] First attempt at supporting cover art With option under Extras --- resources/lib/API.py | 18 +++++-- resources/lib/WriteKodiVideoDB.py | 88 +++++++++++++++---------------- resources/settings.xml | 1 + 3 files changed, 59 insertions(+), 48 deletions(-) diff --git a/resources/lib/API.py b/resources/lib/API.py index 03e3b0f1..9f5bf878 100644 --- a/resources/lib/API.py +++ b/resources/lib/API.py @@ -316,7 +316,7 @@ class API(): tempDate = "01.01.2000" return tempDate - def getArtwork(self, data, type, index = "0", userParentInfo = False): + def getArtwork(self, data, type, mediaType, index = "0", userParentInfo = False): addonSettings = xbmcaddon.Addon(id='plugin.video.emby') id = data.get("Id") @@ -371,11 +371,21 @@ class API(): id = data.get("ParentBackdropItemId") query = "" - height = "10000" - width = "10000" + maxHeight = "10000" + maxWidth = "10000" + height = "" + width = "" played = "0" totalbackdrops = 0 + if addonSettings.getSetting('coverArtratio') == "true": + if mediaType in ("movie","boxset","tvshow"): + if "Primary" in type: + # Only force ratio for cover art for main covers + aspectratio = data.get("PrimaryImageAspectRatio") + width = "&Width=1000" + height = "&Height=1480" + if originalType =="BackdropNoIndicators" and index == "0" and data.get("BackdropImageTags") != None: totalbackdrops = len(data.get("BackdropImageTags")) if totalbackdrops != 0: @@ -392,7 +402,7 @@ class API(): if imageTag == None: imageTag = "e3ab56fe27d389446754d0fb04910a34" - artwork = "%s/mediabrowser/Items/%s/Images/%s/%s?MaxWidth=%s&MaxHeight=%s&Format=original&Tag=%s%s" % (server, id, type, index, width, height, imageTag, query) + artwork = "%s/mediabrowser/Items/%s/Images/%s/%s?MaxWidth=%s&MaxHeight=%s%s%s&Format=original&Tag=%s%s" % (server, id, type, index, maxWidth, maxHeight, height, width, imageTag, query) #artwork = "%s/mediabrowser/Items/%s/Images/%s/%s/%s/original/%s/%s/%s?%s" % (server, id, type, index, imageTag, width, height, played, query) <- broken if addonSettings.getSetting('disableCoverArt')=='true': artwork = artwork + "&EnableImageEnhancers=false" diff --git a/resources/lib/WriteKodiVideoDB.py b/resources/lib/WriteKodiVideoDB.py index 5de8f6b6..239aa0d2 100644 --- a/resources/lib/WriteKodiVideoDB.py +++ b/resources/lib/WriteKodiVideoDB.py @@ -218,14 +218,14 @@ class WriteKodiVideoDB(): self.AddPeopleToMedia(movieid,MBitem.get("People"),"movie", connection, cursor) #update artwork - self.addOrUpdateArt(API().getArtwork(MBitem, "Primary"), movieid, "movie", "thumb", cursor) - self.addOrUpdateArt(API().getArtwork(MBitem, "Primary"), movieid, "movie", "poster", cursor) - self.addOrUpdateArt(API().getArtwork(MBitem, "Banner"), movieid, "movie", "banner", cursor) - self.addOrUpdateArt(API().getArtwork(MBitem, "Logo"), movieid, "movie", "clearlogo", cursor) - self.addOrUpdateArt(API().getArtwork(MBitem, "Art"), movieid, "movie", "clearart", cursor) - self.addOrUpdateArt(API().getArtwork(MBitem, "Thumb"), movieid, "movie", "landscape", cursor) - self.addOrUpdateArt(API().getArtwork(MBitem, "Disc"), movieid, "movie", "discart", cursor) - self.addOrUpdateArt(API().getArtwork(MBitem, "Backdrop"), movieid, "movie", "fanart", cursor) + self.addOrUpdateArt(API().getArtwork(MBitem, "Primary", mediaType = "movie"), movieid, "movie", "thumb", cursor) + self.addOrUpdateArt(API().getArtwork(MBitem, "Primary", mediaType = "movie"), movieid, "movie", "poster", cursor) + self.addOrUpdateArt(API().getArtwork(MBitem, "Banner", mediaType = "movie"), movieid, "movie", "banner", cursor) + self.addOrUpdateArt(API().getArtwork(MBitem, "Logo", mediaType = "movie"), movieid, "movie", "clearlogo", cursor) + self.addOrUpdateArt(API().getArtwork(MBitem, "Art", mediaType = "movie"), movieid, "movie", "clearart", cursor) + self.addOrUpdateArt(API().getArtwork(MBitem, "Thumb", mediaType = "movie"), movieid, "movie", "landscape", cursor) + self.addOrUpdateArt(API().getArtwork(MBitem, "Disc", mediaType = "movie"), movieid, "movie", "discart", cursor) + self.addOrUpdateArt(API().getArtwork(MBitem, "Backdrop", mediaType = "movie"), movieid, "movie", "fanart", cursor) #update genres self.AddGenresToMedia(movieid, genres, "movie", cursor) @@ -379,14 +379,14 @@ class WriteKodiVideoDB(): self.AddPeopleToMedia(idMVideo,MBitem.get("People"),"musicvideo", connection, cursor) #update artwork - self.addOrUpdateArt(API().getArtwork(MBitem, "Primary"), idMVideo, "musicvideo", "thumb", cursor) - self.addOrUpdateArt(API().getArtwork(MBitem, "Primary"), idMVideo, "musicvideo", "poster", cursor) - self.addOrUpdateArt(API().getArtwork(MBitem, "Banner"), idMVideo, "musicvideo", "banner", cursor) - self.addOrUpdateArt(API().getArtwork(MBitem, "Logo"), idMVideo, "musicvideo", "clearlogo", cursor) - self.addOrUpdateArt(API().getArtwork(MBitem, "Art"), idMVideo, "musicvideo", "clearart", cursor) - self.addOrUpdateArt(API().getArtwork(MBitem, "Thumb"), idMVideo, "musicvideo", "landscape", cursor) - self.addOrUpdateArt(API().getArtwork(MBitem, "Disc"), idMVideo, "musicvideo", "discart", cursor) - self.addOrUpdateArt(API().getArtwork(MBitem, "Backdrop"), idMVideo, "musicvideo", "fanart", cursor) + self.addOrUpdateArt(API().getArtwork(MBitem, "Primary", mediaType = "musicvideo"), idMVideo, "musicvideo", "thumb", cursor) + self.addOrUpdateArt(API().getArtwork(MBitem, "Primary", mediaType = "musicvideo"), idMVideo, "musicvideo", "poster", cursor) + self.addOrUpdateArt(API().getArtwork(MBitem, "Banner", mediaType = "musicvideo"), idMVideo, "musicvideo", "banner", cursor) + self.addOrUpdateArt(API().getArtwork(MBitem, "Logo", mediaType = "musicvideo"), idMVideo, "musicvideo", "clearlogo", cursor) + self.addOrUpdateArt(API().getArtwork(MBitem, "Art", mediaType = "musicvideo"), idMVideo, "musicvideo", "clearart", cursor) + self.addOrUpdateArt(API().getArtwork(MBitem, "Thumb", mediaType = "musicvideo"), idMVideo, "musicvideo", "landscape", cursor) + self.addOrUpdateArt(API().getArtwork(MBitem, "Disc", mediaType = "musicvideo"), idMVideo, "musicvideo", "discart", cursor) + self.addOrUpdateArt(API().getArtwork(MBitem, "Backdrop", mediaType = "musicvideo"), idMVideo, "musicvideo", "fanart", cursor) #update genres self.AddGenresToMedia(idMVideo, genres, "musicvideo", cursor) @@ -418,7 +418,7 @@ class WriteKodiVideoDB(): timeInfo = API().getTimeInfo(MBitem) userData=API().getUserData(MBitem) - thumbPath = API().getArtwork(MBitem, "Primary") + #thumbPath = API().getArtwork(MBitem, "Primary") # If the item already exist in the local Kodi DB we'll perform a full item update # If the item doesn't exist, we'll add it to the database @@ -540,14 +540,14 @@ class WriteKodiVideoDB(): self.AddTagToMedia(showid, "Favorite tvshows", "tvshow", cursor, True) #update artwork - self.addOrUpdateArt(API().getArtwork(MBitem, "Primary"), showid, "tvshow", "thumb", cursor) - self.addOrUpdateArt(API().getArtwork(MBitem, "Primary"), showid, "tvshow", "poster", cursor) - self.addOrUpdateArt(API().getArtwork(MBitem, "Banner"), showid, "tvshow", "banner", cursor) - self.addOrUpdateArt(API().getArtwork(MBitem, "Logo"), showid, "tvshow", "clearlogo", cursor) - self.addOrUpdateArt(API().getArtwork(MBitem, "Art"), showid, "tvshow", "clearart", cursor) - self.addOrUpdateArt(API().getArtwork(MBitem, "Thumb"), showid, "tvshow", "landscape", cursor) - self.addOrUpdateArt(API().getArtwork(MBitem, "Disc"), showid, "tvshow", "discart", cursor) - self.addOrUpdateArt(API().getArtwork(MBitem, "Backdrop"), showid, "tvshow", "fanart", cursor) + self.addOrUpdateArt(API().getArtwork(MBitem, "Primary", mediaType = "tvshow"), showid, "tvshow", "thumb", cursor) + self.addOrUpdateArt(API().getArtwork(MBitem, "Primary", mediaType = "tvshow"), showid, "tvshow", "poster", cursor) + self.addOrUpdateArt(API().getArtwork(MBitem, "Banner", mediaType = "tvshow"), showid, "tvshow", "banner", cursor) + self.addOrUpdateArt(API().getArtwork(MBitem, "Logo", mediaType = "tvshow"), showid, "tvshow", "clearlogo", cursor) + self.addOrUpdateArt(API().getArtwork(MBitem, "Art", mediaType = "tvshow"), showid, "tvshow", "clearart", cursor) + self.addOrUpdateArt(API().getArtwork(MBitem, "Thumb", mediaType = "tvshow"), showid, "tvshow", "landscape", cursor) + self.addOrUpdateArt(API().getArtwork(MBitem, "Disc", mediaType = "tvshow"), showid, "tvshow", "discart", cursor) + self.addOrUpdateArt(API().getArtwork(MBitem, "Backdrop", mediaType = "tvshow"), showid, "tvshow", "fanart", cursor) #update season details self.updateSeasons(MBitem["Id"], showid, connection, cursor) @@ -705,7 +705,7 @@ class WriteKodiVideoDB(): self.AddStreamDetailsToMedia(API().getMediaStreams(MBitem), fileid, cursor) #update artwork - self.addOrUpdateArt(API().getArtwork(MBitem, "Primary"), episodeid, "episode", "thumb", cursor) + self.addOrUpdateArt(API().getArtwork(MBitem, "Primary", mediaType = "episode"), episodeid, "episode", "thumb", cursor) def deleteItemFromKodiLibrary(self, id, connection, cursor ): @@ -749,13 +749,13 @@ class WriteKodiVideoDB(): seasonid = result[0] #update artwork - imageUrl = API().getArtwork(season, "Thumb") + imageUrl = API().getArtwork(season, "Thumb", mediaType = "season") self.addOrUpdateArt(imageUrl, seasonid, "season", "landscape", cursor) - imageUrl = API().getArtwork(season, "Primary") + imageUrl = API().getArtwork(season, "Primary", mediaType = "season") self.addOrUpdateArt(imageUrl, seasonid, "season", "poster", cursor) - imageUrl = API().getArtwork(season, "Banner") + imageUrl = API().getArtwork(season, "Banner", mediaType = "season") self.addOrUpdateArt(imageUrl, seasonid, "season", "banner", cursor) # Set All season poster MBitem = ReadEmbyDB().getFullItem(embyTvShowId) @@ -770,7 +770,7 @@ class WriteKodiVideoDB(): cursor.execute("INSERT into seasons(idSeason, idShow, season) values(?, ?, ?)", (seasonid, kodiTvShowId, seasonNum)) else: seasonid = result[0] - imageUrl = API().getArtwork(MBitem, "Primary") + imageUrl = API().getArtwork(MBitem, "Primary", mediaType = "season") self.addOrUpdateArt(imageUrl, seasonid, "season", "poster", cursor) def addOrUpdateArt(self, imageUrl, kodiId, mediaType, imageType, cursor): @@ -1147,13 +1147,13 @@ class WriteKodiVideoDB(): existing_type_map[row[0] ] = row[1] artwork = {} - artwork["poster"] = API().getArtwork(boxset, "Primary") - artwork["banner"] = API().getArtwork(boxset, "Banner") - artwork["clearlogo"] = API().getArtwork(boxset, "Logo") - artwork["clearart"] = API().getArtwork(boxset, "Art") - artwork["landscape"] = API().getArtwork(boxset, "Thumb") - artwork["discart"] = API().getArtwork(boxset, "Disc") - artwork["fanart"] = API().getArtwork(boxset, "Backdrop") + artwork["poster"] = API().getArtwork(boxset, "Primary", mediaType = "boxset") + artwork["banner"] = API().getArtwork(boxset, "Banner", mediaType = "boxset") + artwork["clearlogo"] = API().getArtwork(boxset, "Logo", mediaType = "boxset") + artwork["clearart"] = API().getArtwork(boxset, "Art", mediaType = "boxset") + artwork["landscape"] = API().getArtwork(boxset, "Thumb", mediaType = "boxset") + artwork["discart"] = API().getArtwork(boxset, "Disc", mediaType = "boxset") + artwork["fanart"] = API().getArtwork(boxset, "Backdrop", mediaType = "boxset") art_types = ['poster','fanart','landscape','clearlogo','clearart','banner','discart'] for update_type in art_types: @@ -1184,13 +1184,13 @@ class WriteKodiVideoDB(): existing_type_map[row[0] ] = row[1] artwork = {} - artwork["poster"] = API().getArtwork(boxset, "Primary") - artwork["banner"] = API().getArtwork(boxset, "Banner") - artwork["clearlogo"] = API().getArtwork(boxset, "Logo") - artwork["clearart"] = API().getArtwork(boxset, "Art") - artwork["landscape"] = API().getArtwork(boxset, "Thumb") - artwork["discart"] = API().getArtwork(boxset, "Disc") - artwork["fanart"] = API().getArtwork(boxset, "Backdrop") + artwork["poster"] = API().getArtwork(boxset, "Primary", mediaType = "boxset") + artwork["banner"] = API().getArtwork(boxset, "Banner", mediaType = "boxset") + artwork["clearlogo"] = API().getArtwork(boxset, "Logo", mediaType = "boxset") + artwork["clearart"] = API().getArtwork(boxset, "Art", mediaType = "boxset") + artwork["landscape"] = API().getArtwork(boxset, "Thumb", mediaType = "boxset") + artwork["discart"] = API().getArtwork(boxset, "Disc", mediaType = "boxset") + artwork["fanart"] = API().getArtwork(boxset, "Backdrop", mediaType = "boxset") art_types = ['poster','fanart','landscape','clearlogo','clearart','banner','discart'] for update_type in art_types: diff --git a/resources/settings.xml b/resources/settings.xml index 32a2d37f..6eaca198 100644 --- a/resources/settings.xml +++ b/resources/settings.xml @@ -33,6 +33,7 @@ + From fadc3e0e4983f79aebda5ce5cc15b944c43d1948 Mon Sep 17 00:00:00 2001 From: angelblue05 Date: Mon, 29 Jun 2015 11:43:29 -0500 Subject: [PATCH 07/13] Revert "First attempt at supporting cover art" This reverts commit c71e5eb29358ee10261ab974e6dde0f1d551409e. --- resources/lib/API.py | 18 ++----- resources/lib/WriteKodiVideoDB.py | 88 +++++++++++++++---------------- resources/settings.xml | 1 - 3 files changed, 48 insertions(+), 59 deletions(-) diff --git a/resources/lib/API.py b/resources/lib/API.py index 9f5bf878..03e3b0f1 100644 --- a/resources/lib/API.py +++ b/resources/lib/API.py @@ -316,7 +316,7 @@ class API(): tempDate = "01.01.2000" return tempDate - def getArtwork(self, data, type, mediaType, index = "0", userParentInfo = False): + def getArtwork(self, data, type, index = "0", userParentInfo = False): addonSettings = xbmcaddon.Addon(id='plugin.video.emby') id = data.get("Id") @@ -371,21 +371,11 @@ class API(): id = data.get("ParentBackdropItemId") query = "" - maxHeight = "10000" - maxWidth = "10000" - height = "" - width = "" + height = "10000" + width = "10000" played = "0" totalbackdrops = 0 - if addonSettings.getSetting('coverArtratio') == "true": - if mediaType in ("movie","boxset","tvshow"): - if "Primary" in type: - # Only force ratio for cover art for main covers - aspectratio = data.get("PrimaryImageAspectRatio") - width = "&Width=1000" - height = "&Height=1480" - if originalType =="BackdropNoIndicators" and index == "0" and data.get("BackdropImageTags") != None: totalbackdrops = len(data.get("BackdropImageTags")) if totalbackdrops != 0: @@ -402,7 +392,7 @@ class API(): if imageTag == None: imageTag = "e3ab56fe27d389446754d0fb04910a34" - artwork = "%s/mediabrowser/Items/%s/Images/%s/%s?MaxWidth=%s&MaxHeight=%s%s%s&Format=original&Tag=%s%s" % (server, id, type, index, maxWidth, maxHeight, height, width, imageTag, query) + artwork = "%s/mediabrowser/Items/%s/Images/%s/%s?MaxWidth=%s&MaxHeight=%s&Format=original&Tag=%s%s" % (server, id, type, index, width, height, imageTag, query) #artwork = "%s/mediabrowser/Items/%s/Images/%s/%s/%s/original/%s/%s/%s?%s" % (server, id, type, index, imageTag, width, height, played, query) <- broken if addonSettings.getSetting('disableCoverArt')=='true': artwork = artwork + "&EnableImageEnhancers=false" diff --git a/resources/lib/WriteKodiVideoDB.py b/resources/lib/WriteKodiVideoDB.py index 239aa0d2..5de8f6b6 100644 --- a/resources/lib/WriteKodiVideoDB.py +++ b/resources/lib/WriteKodiVideoDB.py @@ -218,14 +218,14 @@ class WriteKodiVideoDB(): self.AddPeopleToMedia(movieid,MBitem.get("People"),"movie", connection, cursor) #update artwork - self.addOrUpdateArt(API().getArtwork(MBitem, "Primary", mediaType = "movie"), movieid, "movie", "thumb", cursor) - self.addOrUpdateArt(API().getArtwork(MBitem, "Primary", mediaType = "movie"), movieid, "movie", "poster", cursor) - self.addOrUpdateArt(API().getArtwork(MBitem, "Banner", mediaType = "movie"), movieid, "movie", "banner", cursor) - self.addOrUpdateArt(API().getArtwork(MBitem, "Logo", mediaType = "movie"), movieid, "movie", "clearlogo", cursor) - self.addOrUpdateArt(API().getArtwork(MBitem, "Art", mediaType = "movie"), movieid, "movie", "clearart", cursor) - self.addOrUpdateArt(API().getArtwork(MBitem, "Thumb", mediaType = "movie"), movieid, "movie", "landscape", cursor) - self.addOrUpdateArt(API().getArtwork(MBitem, "Disc", mediaType = "movie"), movieid, "movie", "discart", cursor) - self.addOrUpdateArt(API().getArtwork(MBitem, "Backdrop", mediaType = "movie"), movieid, "movie", "fanart", cursor) + self.addOrUpdateArt(API().getArtwork(MBitem, "Primary"), movieid, "movie", "thumb", cursor) + self.addOrUpdateArt(API().getArtwork(MBitem, "Primary"), movieid, "movie", "poster", cursor) + self.addOrUpdateArt(API().getArtwork(MBitem, "Banner"), movieid, "movie", "banner", cursor) + self.addOrUpdateArt(API().getArtwork(MBitem, "Logo"), movieid, "movie", "clearlogo", cursor) + self.addOrUpdateArt(API().getArtwork(MBitem, "Art"), movieid, "movie", "clearart", cursor) + self.addOrUpdateArt(API().getArtwork(MBitem, "Thumb"), movieid, "movie", "landscape", cursor) + self.addOrUpdateArt(API().getArtwork(MBitem, "Disc"), movieid, "movie", "discart", cursor) + self.addOrUpdateArt(API().getArtwork(MBitem, "Backdrop"), movieid, "movie", "fanart", cursor) #update genres self.AddGenresToMedia(movieid, genres, "movie", cursor) @@ -379,14 +379,14 @@ class WriteKodiVideoDB(): self.AddPeopleToMedia(idMVideo,MBitem.get("People"),"musicvideo", connection, cursor) #update artwork - self.addOrUpdateArt(API().getArtwork(MBitem, "Primary", mediaType = "musicvideo"), idMVideo, "musicvideo", "thumb", cursor) - self.addOrUpdateArt(API().getArtwork(MBitem, "Primary", mediaType = "musicvideo"), idMVideo, "musicvideo", "poster", cursor) - self.addOrUpdateArt(API().getArtwork(MBitem, "Banner", mediaType = "musicvideo"), idMVideo, "musicvideo", "banner", cursor) - self.addOrUpdateArt(API().getArtwork(MBitem, "Logo", mediaType = "musicvideo"), idMVideo, "musicvideo", "clearlogo", cursor) - self.addOrUpdateArt(API().getArtwork(MBitem, "Art", mediaType = "musicvideo"), idMVideo, "musicvideo", "clearart", cursor) - self.addOrUpdateArt(API().getArtwork(MBitem, "Thumb", mediaType = "musicvideo"), idMVideo, "musicvideo", "landscape", cursor) - self.addOrUpdateArt(API().getArtwork(MBitem, "Disc", mediaType = "musicvideo"), idMVideo, "musicvideo", "discart", cursor) - self.addOrUpdateArt(API().getArtwork(MBitem, "Backdrop", mediaType = "musicvideo"), idMVideo, "musicvideo", "fanart", cursor) + self.addOrUpdateArt(API().getArtwork(MBitem, "Primary"), idMVideo, "musicvideo", "thumb", cursor) + self.addOrUpdateArt(API().getArtwork(MBitem, "Primary"), idMVideo, "musicvideo", "poster", cursor) + self.addOrUpdateArt(API().getArtwork(MBitem, "Banner"), idMVideo, "musicvideo", "banner", cursor) + self.addOrUpdateArt(API().getArtwork(MBitem, "Logo"), idMVideo, "musicvideo", "clearlogo", cursor) + self.addOrUpdateArt(API().getArtwork(MBitem, "Art"), idMVideo, "musicvideo", "clearart", cursor) + self.addOrUpdateArt(API().getArtwork(MBitem, "Thumb"), idMVideo, "musicvideo", "landscape", cursor) + self.addOrUpdateArt(API().getArtwork(MBitem, "Disc"), idMVideo, "musicvideo", "discart", cursor) + self.addOrUpdateArt(API().getArtwork(MBitem, "Backdrop"), idMVideo, "musicvideo", "fanart", cursor) #update genres self.AddGenresToMedia(idMVideo, genres, "musicvideo", cursor) @@ -418,7 +418,7 @@ class WriteKodiVideoDB(): timeInfo = API().getTimeInfo(MBitem) userData=API().getUserData(MBitem) - #thumbPath = API().getArtwork(MBitem, "Primary") + thumbPath = API().getArtwork(MBitem, "Primary") # If the item already exist in the local Kodi DB we'll perform a full item update # If the item doesn't exist, we'll add it to the database @@ -540,14 +540,14 @@ class WriteKodiVideoDB(): self.AddTagToMedia(showid, "Favorite tvshows", "tvshow", cursor, True) #update artwork - self.addOrUpdateArt(API().getArtwork(MBitem, "Primary", mediaType = "tvshow"), showid, "tvshow", "thumb", cursor) - self.addOrUpdateArt(API().getArtwork(MBitem, "Primary", mediaType = "tvshow"), showid, "tvshow", "poster", cursor) - self.addOrUpdateArt(API().getArtwork(MBitem, "Banner", mediaType = "tvshow"), showid, "tvshow", "banner", cursor) - self.addOrUpdateArt(API().getArtwork(MBitem, "Logo", mediaType = "tvshow"), showid, "tvshow", "clearlogo", cursor) - self.addOrUpdateArt(API().getArtwork(MBitem, "Art", mediaType = "tvshow"), showid, "tvshow", "clearart", cursor) - self.addOrUpdateArt(API().getArtwork(MBitem, "Thumb", mediaType = "tvshow"), showid, "tvshow", "landscape", cursor) - self.addOrUpdateArt(API().getArtwork(MBitem, "Disc", mediaType = "tvshow"), showid, "tvshow", "discart", cursor) - self.addOrUpdateArt(API().getArtwork(MBitem, "Backdrop", mediaType = "tvshow"), showid, "tvshow", "fanart", cursor) + self.addOrUpdateArt(API().getArtwork(MBitem, "Primary"), showid, "tvshow", "thumb", cursor) + self.addOrUpdateArt(API().getArtwork(MBitem, "Primary"), showid, "tvshow", "poster", cursor) + self.addOrUpdateArt(API().getArtwork(MBitem, "Banner"), showid, "tvshow", "banner", cursor) + self.addOrUpdateArt(API().getArtwork(MBitem, "Logo"), showid, "tvshow", "clearlogo", cursor) + self.addOrUpdateArt(API().getArtwork(MBitem, "Art"), showid, "tvshow", "clearart", cursor) + self.addOrUpdateArt(API().getArtwork(MBitem, "Thumb"), showid, "tvshow", "landscape", cursor) + self.addOrUpdateArt(API().getArtwork(MBitem, "Disc"), showid, "tvshow", "discart", cursor) + self.addOrUpdateArt(API().getArtwork(MBitem, "Backdrop"), showid, "tvshow", "fanart", cursor) #update season details self.updateSeasons(MBitem["Id"], showid, connection, cursor) @@ -705,7 +705,7 @@ class WriteKodiVideoDB(): self.AddStreamDetailsToMedia(API().getMediaStreams(MBitem), fileid, cursor) #update artwork - self.addOrUpdateArt(API().getArtwork(MBitem, "Primary", mediaType = "episode"), episodeid, "episode", "thumb", cursor) + self.addOrUpdateArt(API().getArtwork(MBitem, "Primary"), episodeid, "episode", "thumb", cursor) def deleteItemFromKodiLibrary(self, id, connection, cursor ): @@ -749,13 +749,13 @@ class WriteKodiVideoDB(): seasonid = result[0] #update artwork - imageUrl = API().getArtwork(season, "Thumb", mediaType = "season") + imageUrl = API().getArtwork(season, "Thumb") self.addOrUpdateArt(imageUrl, seasonid, "season", "landscape", cursor) - imageUrl = API().getArtwork(season, "Primary", mediaType = "season") + imageUrl = API().getArtwork(season, "Primary") self.addOrUpdateArt(imageUrl, seasonid, "season", "poster", cursor) - imageUrl = API().getArtwork(season, "Banner", mediaType = "season") + imageUrl = API().getArtwork(season, "Banner") self.addOrUpdateArt(imageUrl, seasonid, "season", "banner", cursor) # Set All season poster MBitem = ReadEmbyDB().getFullItem(embyTvShowId) @@ -770,7 +770,7 @@ class WriteKodiVideoDB(): cursor.execute("INSERT into seasons(idSeason, idShow, season) values(?, ?, ?)", (seasonid, kodiTvShowId, seasonNum)) else: seasonid = result[0] - imageUrl = API().getArtwork(MBitem, "Primary", mediaType = "season") + imageUrl = API().getArtwork(MBitem, "Primary") self.addOrUpdateArt(imageUrl, seasonid, "season", "poster", cursor) def addOrUpdateArt(self, imageUrl, kodiId, mediaType, imageType, cursor): @@ -1147,13 +1147,13 @@ class WriteKodiVideoDB(): existing_type_map[row[0] ] = row[1] artwork = {} - artwork["poster"] = API().getArtwork(boxset, "Primary", mediaType = "boxset") - artwork["banner"] = API().getArtwork(boxset, "Banner", mediaType = "boxset") - artwork["clearlogo"] = API().getArtwork(boxset, "Logo", mediaType = "boxset") - artwork["clearart"] = API().getArtwork(boxset, "Art", mediaType = "boxset") - artwork["landscape"] = API().getArtwork(boxset, "Thumb", mediaType = "boxset") - artwork["discart"] = API().getArtwork(boxset, "Disc", mediaType = "boxset") - artwork["fanart"] = API().getArtwork(boxset, "Backdrop", mediaType = "boxset") + artwork["poster"] = API().getArtwork(boxset, "Primary") + artwork["banner"] = API().getArtwork(boxset, "Banner") + artwork["clearlogo"] = API().getArtwork(boxset, "Logo") + artwork["clearart"] = API().getArtwork(boxset, "Art") + artwork["landscape"] = API().getArtwork(boxset, "Thumb") + artwork["discart"] = API().getArtwork(boxset, "Disc") + artwork["fanart"] = API().getArtwork(boxset, "Backdrop") art_types = ['poster','fanart','landscape','clearlogo','clearart','banner','discart'] for update_type in art_types: @@ -1184,13 +1184,13 @@ class WriteKodiVideoDB(): existing_type_map[row[0] ] = row[1] artwork = {} - artwork["poster"] = API().getArtwork(boxset, "Primary", mediaType = "boxset") - artwork["banner"] = API().getArtwork(boxset, "Banner", mediaType = "boxset") - artwork["clearlogo"] = API().getArtwork(boxset, "Logo", mediaType = "boxset") - artwork["clearart"] = API().getArtwork(boxset, "Art", mediaType = "boxset") - artwork["landscape"] = API().getArtwork(boxset, "Thumb", mediaType = "boxset") - artwork["discart"] = API().getArtwork(boxset, "Disc", mediaType = "boxset") - artwork["fanart"] = API().getArtwork(boxset, "Backdrop", mediaType = "boxset") + artwork["poster"] = API().getArtwork(boxset, "Primary") + artwork["banner"] = API().getArtwork(boxset, "Banner") + artwork["clearlogo"] = API().getArtwork(boxset, "Logo") + artwork["clearart"] = API().getArtwork(boxset, "Art") + artwork["landscape"] = API().getArtwork(boxset, "Thumb") + artwork["discart"] = API().getArtwork(boxset, "Disc") + artwork["fanart"] = API().getArtwork(boxset, "Backdrop") art_types = ['poster','fanart','landscape','clearlogo','clearart','banner','discart'] for update_type in art_types: diff --git a/resources/settings.xml b/resources/settings.xml index 6eaca198..32a2d37f 100644 --- a/resources/settings.xml +++ b/resources/settings.xml @@ -33,7 +33,6 @@ - From 62ea6b0eb8c770ba0f5f33ce2974099c69971075 Mon Sep 17 00:00:00 2001 From: angelblue05 Date: Mon, 29 Jun 2015 11:43:38 -0500 Subject: [PATCH 08/13] Revert "Revert "Revert "Support alternate address""" This reverts commit 385c3cae7e593ce6c17268f906502f5bdd0ffd74. --- resources/lib/UserClient.py | 4 ---- resources/settings.xml | 4 +--- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/resources/lib/UserClient.py b/resources/lib/UserClient.py index 0f97d516..8cc363ab 100644 --- a/resources/lib/UserClient.py +++ b/resources/lib/UserClient.py @@ -96,10 +96,6 @@ class UserClient(threading.Thread): HTTPS = addon.getSetting('https') host = addon.getSetting('ipaddress') port = addon.getSetting('port') - # Alternate host - if addon.getSetting('altip') == "true": - host = addon.getSetting('secondipaddress') - server = host + ":" + port if host == "": diff --git a/resources/settings.xml b/resources/settings.xml index 32a2d37f..fd9facd4 100644 --- a/resources/settings.xml +++ b/resources/settings.xml @@ -2,9 +2,7 @@ - - - + From 4e802623c3aea66297dacb09c09d46923f406004 Mon Sep 17 00:00:00 2001 From: angelblue05 Date: Mon, 29 Jun 2015 11:44:55 -0500 Subject: [PATCH 09/13] Revert "Revert "First attempt at supporting cover art"" This reverts commit fadc3e0e4983f79aebda5ce5cc15b944c43d1948. --- resources/lib/API.py | 18 +++++-- resources/lib/WriteKodiVideoDB.py | 88 +++++++++++++++---------------- resources/settings.xml | 1 + 3 files changed, 59 insertions(+), 48 deletions(-) diff --git a/resources/lib/API.py b/resources/lib/API.py index 03e3b0f1..9f5bf878 100644 --- a/resources/lib/API.py +++ b/resources/lib/API.py @@ -316,7 +316,7 @@ class API(): tempDate = "01.01.2000" return tempDate - def getArtwork(self, data, type, index = "0", userParentInfo = False): + def getArtwork(self, data, type, mediaType, index = "0", userParentInfo = False): addonSettings = xbmcaddon.Addon(id='plugin.video.emby') id = data.get("Id") @@ -371,11 +371,21 @@ class API(): id = data.get("ParentBackdropItemId") query = "" - height = "10000" - width = "10000" + maxHeight = "10000" + maxWidth = "10000" + height = "" + width = "" played = "0" totalbackdrops = 0 + if addonSettings.getSetting('coverArtratio') == "true": + if mediaType in ("movie","boxset","tvshow"): + if "Primary" in type: + # Only force ratio for cover art for main covers + aspectratio = data.get("PrimaryImageAspectRatio") + width = "&Width=1000" + height = "&Height=1480" + if originalType =="BackdropNoIndicators" and index == "0" and data.get("BackdropImageTags") != None: totalbackdrops = len(data.get("BackdropImageTags")) if totalbackdrops != 0: @@ -392,7 +402,7 @@ class API(): if imageTag == None: imageTag = "e3ab56fe27d389446754d0fb04910a34" - artwork = "%s/mediabrowser/Items/%s/Images/%s/%s?MaxWidth=%s&MaxHeight=%s&Format=original&Tag=%s%s" % (server, id, type, index, width, height, imageTag, query) + artwork = "%s/mediabrowser/Items/%s/Images/%s/%s?MaxWidth=%s&MaxHeight=%s%s%s&Format=original&Tag=%s%s" % (server, id, type, index, maxWidth, maxHeight, height, width, imageTag, query) #artwork = "%s/mediabrowser/Items/%s/Images/%s/%s/%s/original/%s/%s/%s?%s" % (server, id, type, index, imageTag, width, height, played, query) <- broken if addonSettings.getSetting('disableCoverArt')=='true': artwork = artwork + "&EnableImageEnhancers=false" diff --git a/resources/lib/WriteKodiVideoDB.py b/resources/lib/WriteKodiVideoDB.py index 5de8f6b6..239aa0d2 100644 --- a/resources/lib/WriteKodiVideoDB.py +++ b/resources/lib/WriteKodiVideoDB.py @@ -218,14 +218,14 @@ class WriteKodiVideoDB(): self.AddPeopleToMedia(movieid,MBitem.get("People"),"movie", connection, cursor) #update artwork - self.addOrUpdateArt(API().getArtwork(MBitem, "Primary"), movieid, "movie", "thumb", cursor) - self.addOrUpdateArt(API().getArtwork(MBitem, "Primary"), movieid, "movie", "poster", cursor) - self.addOrUpdateArt(API().getArtwork(MBitem, "Banner"), movieid, "movie", "banner", cursor) - self.addOrUpdateArt(API().getArtwork(MBitem, "Logo"), movieid, "movie", "clearlogo", cursor) - self.addOrUpdateArt(API().getArtwork(MBitem, "Art"), movieid, "movie", "clearart", cursor) - self.addOrUpdateArt(API().getArtwork(MBitem, "Thumb"), movieid, "movie", "landscape", cursor) - self.addOrUpdateArt(API().getArtwork(MBitem, "Disc"), movieid, "movie", "discart", cursor) - self.addOrUpdateArt(API().getArtwork(MBitem, "Backdrop"), movieid, "movie", "fanart", cursor) + self.addOrUpdateArt(API().getArtwork(MBitem, "Primary", mediaType = "movie"), movieid, "movie", "thumb", cursor) + self.addOrUpdateArt(API().getArtwork(MBitem, "Primary", mediaType = "movie"), movieid, "movie", "poster", cursor) + self.addOrUpdateArt(API().getArtwork(MBitem, "Banner", mediaType = "movie"), movieid, "movie", "banner", cursor) + self.addOrUpdateArt(API().getArtwork(MBitem, "Logo", mediaType = "movie"), movieid, "movie", "clearlogo", cursor) + self.addOrUpdateArt(API().getArtwork(MBitem, "Art", mediaType = "movie"), movieid, "movie", "clearart", cursor) + self.addOrUpdateArt(API().getArtwork(MBitem, "Thumb", mediaType = "movie"), movieid, "movie", "landscape", cursor) + self.addOrUpdateArt(API().getArtwork(MBitem, "Disc", mediaType = "movie"), movieid, "movie", "discart", cursor) + self.addOrUpdateArt(API().getArtwork(MBitem, "Backdrop", mediaType = "movie"), movieid, "movie", "fanart", cursor) #update genres self.AddGenresToMedia(movieid, genres, "movie", cursor) @@ -379,14 +379,14 @@ class WriteKodiVideoDB(): self.AddPeopleToMedia(idMVideo,MBitem.get("People"),"musicvideo", connection, cursor) #update artwork - self.addOrUpdateArt(API().getArtwork(MBitem, "Primary"), idMVideo, "musicvideo", "thumb", cursor) - self.addOrUpdateArt(API().getArtwork(MBitem, "Primary"), idMVideo, "musicvideo", "poster", cursor) - self.addOrUpdateArt(API().getArtwork(MBitem, "Banner"), idMVideo, "musicvideo", "banner", cursor) - self.addOrUpdateArt(API().getArtwork(MBitem, "Logo"), idMVideo, "musicvideo", "clearlogo", cursor) - self.addOrUpdateArt(API().getArtwork(MBitem, "Art"), idMVideo, "musicvideo", "clearart", cursor) - self.addOrUpdateArt(API().getArtwork(MBitem, "Thumb"), idMVideo, "musicvideo", "landscape", cursor) - self.addOrUpdateArt(API().getArtwork(MBitem, "Disc"), idMVideo, "musicvideo", "discart", cursor) - self.addOrUpdateArt(API().getArtwork(MBitem, "Backdrop"), idMVideo, "musicvideo", "fanart", cursor) + self.addOrUpdateArt(API().getArtwork(MBitem, "Primary", mediaType = "musicvideo"), idMVideo, "musicvideo", "thumb", cursor) + self.addOrUpdateArt(API().getArtwork(MBitem, "Primary", mediaType = "musicvideo"), idMVideo, "musicvideo", "poster", cursor) + self.addOrUpdateArt(API().getArtwork(MBitem, "Banner", mediaType = "musicvideo"), idMVideo, "musicvideo", "banner", cursor) + self.addOrUpdateArt(API().getArtwork(MBitem, "Logo", mediaType = "musicvideo"), idMVideo, "musicvideo", "clearlogo", cursor) + self.addOrUpdateArt(API().getArtwork(MBitem, "Art", mediaType = "musicvideo"), idMVideo, "musicvideo", "clearart", cursor) + self.addOrUpdateArt(API().getArtwork(MBitem, "Thumb", mediaType = "musicvideo"), idMVideo, "musicvideo", "landscape", cursor) + self.addOrUpdateArt(API().getArtwork(MBitem, "Disc", mediaType = "musicvideo"), idMVideo, "musicvideo", "discart", cursor) + self.addOrUpdateArt(API().getArtwork(MBitem, "Backdrop", mediaType = "musicvideo"), idMVideo, "musicvideo", "fanart", cursor) #update genres self.AddGenresToMedia(idMVideo, genres, "musicvideo", cursor) @@ -418,7 +418,7 @@ class WriteKodiVideoDB(): timeInfo = API().getTimeInfo(MBitem) userData=API().getUserData(MBitem) - thumbPath = API().getArtwork(MBitem, "Primary") + #thumbPath = API().getArtwork(MBitem, "Primary") # If the item already exist in the local Kodi DB we'll perform a full item update # If the item doesn't exist, we'll add it to the database @@ -540,14 +540,14 @@ class WriteKodiVideoDB(): self.AddTagToMedia(showid, "Favorite tvshows", "tvshow", cursor, True) #update artwork - self.addOrUpdateArt(API().getArtwork(MBitem, "Primary"), showid, "tvshow", "thumb", cursor) - self.addOrUpdateArt(API().getArtwork(MBitem, "Primary"), showid, "tvshow", "poster", cursor) - self.addOrUpdateArt(API().getArtwork(MBitem, "Banner"), showid, "tvshow", "banner", cursor) - self.addOrUpdateArt(API().getArtwork(MBitem, "Logo"), showid, "tvshow", "clearlogo", cursor) - self.addOrUpdateArt(API().getArtwork(MBitem, "Art"), showid, "tvshow", "clearart", cursor) - self.addOrUpdateArt(API().getArtwork(MBitem, "Thumb"), showid, "tvshow", "landscape", cursor) - self.addOrUpdateArt(API().getArtwork(MBitem, "Disc"), showid, "tvshow", "discart", cursor) - self.addOrUpdateArt(API().getArtwork(MBitem, "Backdrop"), showid, "tvshow", "fanart", cursor) + self.addOrUpdateArt(API().getArtwork(MBitem, "Primary", mediaType = "tvshow"), showid, "tvshow", "thumb", cursor) + self.addOrUpdateArt(API().getArtwork(MBitem, "Primary", mediaType = "tvshow"), showid, "tvshow", "poster", cursor) + self.addOrUpdateArt(API().getArtwork(MBitem, "Banner", mediaType = "tvshow"), showid, "tvshow", "banner", cursor) + self.addOrUpdateArt(API().getArtwork(MBitem, "Logo", mediaType = "tvshow"), showid, "tvshow", "clearlogo", cursor) + self.addOrUpdateArt(API().getArtwork(MBitem, "Art", mediaType = "tvshow"), showid, "tvshow", "clearart", cursor) + self.addOrUpdateArt(API().getArtwork(MBitem, "Thumb", mediaType = "tvshow"), showid, "tvshow", "landscape", cursor) + self.addOrUpdateArt(API().getArtwork(MBitem, "Disc", mediaType = "tvshow"), showid, "tvshow", "discart", cursor) + self.addOrUpdateArt(API().getArtwork(MBitem, "Backdrop", mediaType = "tvshow"), showid, "tvshow", "fanart", cursor) #update season details self.updateSeasons(MBitem["Id"], showid, connection, cursor) @@ -705,7 +705,7 @@ class WriteKodiVideoDB(): self.AddStreamDetailsToMedia(API().getMediaStreams(MBitem), fileid, cursor) #update artwork - self.addOrUpdateArt(API().getArtwork(MBitem, "Primary"), episodeid, "episode", "thumb", cursor) + self.addOrUpdateArt(API().getArtwork(MBitem, "Primary", mediaType = "episode"), episodeid, "episode", "thumb", cursor) def deleteItemFromKodiLibrary(self, id, connection, cursor ): @@ -749,13 +749,13 @@ class WriteKodiVideoDB(): seasonid = result[0] #update artwork - imageUrl = API().getArtwork(season, "Thumb") + imageUrl = API().getArtwork(season, "Thumb", mediaType = "season") self.addOrUpdateArt(imageUrl, seasonid, "season", "landscape", cursor) - imageUrl = API().getArtwork(season, "Primary") + imageUrl = API().getArtwork(season, "Primary", mediaType = "season") self.addOrUpdateArt(imageUrl, seasonid, "season", "poster", cursor) - imageUrl = API().getArtwork(season, "Banner") + imageUrl = API().getArtwork(season, "Banner", mediaType = "season") self.addOrUpdateArt(imageUrl, seasonid, "season", "banner", cursor) # Set All season poster MBitem = ReadEmbyDB().getFullItem(embyTvShowId) @@ -770,7 +770,7 @@ class WriteKodiVideoDB(): cursor.execute("INSERT into seasons(idSeason, idShow, season) values(?, ?, ?)", (seasonid, kodiTvShowId, seasonNum)) else: seasonid = result[0] - imageUrl = API().getArtwork(MBitem, "Primary") + imageUrl = API().getArtwork(MBitem, "Primary", mediaType = "season") self.addOrUpdateArt(imageUrl, seasonid, "season", "poster", cursor) def addOrUpdateArt(self, imageUrl, kodiId, mediaType, imageType, cursor): @@ -1147,13 +1147,13 @@ class WriteKodiVideoDB(): existing_type_map[row[0] ] = row[1] artwork = {} - artwork["poster"] = API().getArtwork(boxset, "Primary") - artwork["banner"] = API().getArtwork(boxset, "Banner") - artwork["clearlogo"] = API().getArtwork(boxset, "Logo") - artwork["clearart"] = API().getArtwork(boxset, "Art") - artwork["landscape"] = API().getArtwork(boxset, "Thumb") - artwork["discart"] = API().getArtwork(boxset, "Disc") - artwork["fanart"] = API().getArtwork(boxset, "Backdrop") + artwork["poster"] = API().getArtwork(boxset, "Primary", mediaType = "boxset") + artwork["banner"] = API().getArtwork(boxset, "Banner", mediaType = "boxset") + artwork["clearlogo"] = API().getArtwork(boxset, "Logo", mediaType = "boxset") + artwork["clearart"] = API().getArtwork(boxset, "Art", mediaType = "boxset") + artwork["landscape"] = API().getArtwork(boxset, "Thumb", mediaType = "boxset") + artwork["discart"] = API().getArtwork(boxset, "Disc", mediaType = "boxset") + artwork["fanart"] = API().getArtwork(boxset, "Backdrop", mediaType = "boxset") art_types = ['poster','fanart','landscape','clearlogo','clearart','banner','discart'] for update_type in art_types: @@ -1184,13 +1184,13 @@ class WriteKodiVideoDB(): existing_type_map[row[0] ] = row[1] artwork = {} - artwork["poster"] = API().getArtwork(boxset, "Primary") - artwork["banner"] = API().getArtwork(boxset, "Banner") - artwork["clearlogo"] = API().getArtwork(boxset, "Logo") - artwork["clearart"] = API().getArtwork(boxset, "Art") - artwork["landscape"] = API().getArtwork(boxset, "Thumb") - artwork["discart"] = API().getArtwork(boxset, "Disc") - artwork["fanart"] = API().getArtwork(boxset, "Backdrop") + artwork["poster"] = API().getArtwork(boxset, "Primary", mediaType = "boxset") + artwork["banner"] = API().getArtwork(boxset, "Banner", mediaType = "boxset") + artwork["clearlogo"] = API().getArtwork(boxset, "Logo", mediaType = "boxset") + artwork["clearart"] = API().getArtwork(boxset, "Art", mediaType = "boxset") + artwork["landscape"] = API().getArtwork(boxset, "Thumb", mediaType = "boxset") + artwork["discart"] = API().getArtwork(boxset, "Disc", mediaType = "boxset") + artwork["fanart"] = API().getArtwork(boxset, "Backdrop", mediaType = "boxset") art_types = ['poster','fanart','landscape','clearlogo','clearart','banner','discart'] for update_type in art_types: diff --git a/resources/settings.xml b/resources/settings.xml index fd9facd4..ca9ca221 100644 --- a/resources/settings.xml +++ b/resources/settings.xml @@ -31,6 +31,7 @@ + From b6668ac6afa0c936a3354c4a5bfab090668f2696 Mon Sep 17 00:00:00 2001 From: angelblue05 Date: Mon, 29 Jun 2015 11:45:03 -0500 Subject: [PATCH 10/13] Revert "Revert "Revert "Revert "Support alternate address"""" This reverts commit 62ea6b0eb8c770ba0f5f33ce2974099c69971075. --- resources/lib/UserClient.py | 4 ++++ resources/settings.xml | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/resources/lib/UserClient.py b/resources/lib/UserClient.py index 8cc363ab..0f97d516 100644 --- a/resources/lib/UserClient.py +++ b/resources/lib/UserClient.py @@ -96,6 +96,10 @@ class UserClient(threading.Thread): HTTPS = addon.getSetting('https') host = addon.getSetting('ipaddress') port = addon.getSetting('port') + # Alternate host + if addon.getSetting('altip') == "true": + host = addon.getSetting('secondipaddress') + server = host + ":" + port if host == "": diff --git a/resources/settings.xml b/resources/settings.xml index ca9ca221..6eaca198 100644 --- a/resources/settings.xml +++ b/resources/settings.xml @@ -2,7 +2,9 @@ - + + + From 7dfe572a2ca01760e297bb066b1cdd6d3c0c3703 Mon Sep 17 00:00:00 2001 From: angelblue05 Date: Mon, 29 Jun 2015 11:46:16 -0500 Subject: [PATCH 11/13] Version bump 1.1.12 --- addon.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addon.xml b/addon.xml index 9ad04501..eed135ea 100644 --- a/addon.xml +++ b/addon.xml @@ -1,7 +1,7 @@ From 26448574d413d958e3a40aed7b7cfe009cce86f9 Mon Sep 17 00:00:00 2001 From: angelblue05 Date: Mon, 29 Jun 2015 13:14:54 -0500 Subject: [PATCH 12/13] Add default value for mediatype The cover art should only affect primary posters for video library, nothing else. --- resources/lib/API.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/lib/API.py b/resources/lib/API.py index 9f5bf878..cfc7a210 100644 --- a/resources/lib/API.py +++ b/resources/lib/API.py @@ -316,7 +316,7 @@ class API(): tempDate = "01.01.2000" return tempDate - def getArtwork(self, data, type, mediaType, index = "0", userParentInfo = False): + def getArtwork(self, data, type, mediaType = "", index = "0", userParentInfo = False): addonSettings = xbmcaddon.Addon(id='plugin.video.emby') id = data.get("Id") From 8e8f9d574d1c57475bc6ed97f2465a3a50baf4f3 Mon Sep 17 00:00:00 2001 From: angelblue05 Date: Mon, 29 Jun 2015 13:15:36 -0500 Subject: [PATCH 13/13] Version bump 1.1.13 Emergency fix! --- addon.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addon.xml b/addon.xml index eed135ea..63cee45a 100644 --- a/addon.xml +++ b/addon.xml @@ -1,7 +1,7 @@