mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-26 10:46:11 +00:00
add poster artwork to episodes
This commit is contained in:
parent
73ac8c46ce
commit
b9ebb81322
1 changed files with 22 additions and 16 deletions
|
@ -388,7 +388,7 @@ class WriteKodiDB():
|
||||||
# for Helix we use the whole time string, for kodi 15 we have to change to only the datestring
|
# for Helix we use the whole time string, for kodi 15 we have to change to only the datestring
|
||||||
# see: http://forum.kodi.tv/showthread.php?tid=218743
|
# see: http://forum.kodi.tv/showthread.php?tid=218743
|
||||||
if KodiItem["firstaired"] != premieredate:
|
if KodiItem["firstaired"] != premieredate:
|
||||||
self.updateProperty(KodiItem,"firstaired",firstaired,"episode")
|
changes |= self.updateProperty(KodiItem,"firstaired",firstaired,"episode")
|
||||||
|
|
||||||
if MBitem.get("CriticRating") != None:
|
if MBitem.get("CriticRating") != None:
|
||||||
changes |= self.updateProperty(KodiItem,"rating",int(MBitem.get("CriticRating"))/10,"episode")
|
changes |= self.updateProperty(KodiItem,"rating",int(MBitem.get("CriticRating"))/10,"episode")
|
||||||
|
@ -405,8 +405,10 @@ class WriteKodiDB():
|
||||||
|
|
||||||
def getArtworkParam_Batched(self, KodiItem, MBitem, params):
|
def getArtworkParam_Batched(self, KodiItem, MBitem, params):
|
||||||
|
|
||||||
'''
|
|
||||||
item_type=str(MBitem.get("Type"))
|
item_type=str(MBitem.get("Type"))
|
||||||
|
|
||||||
|
'''
|
||||||
if item_type == "Series":
|
if item_type == "Series":
|
||||||
id = KodiItem['tvshowid']
|
id = KodiItem['tvshowid']
|
||||||
jsoncommand = '{"jsonrpc": "2.0", "method": "VideoLibrary.SetTVShowDetails", "params": { "tvshowid": %i, "art": %s}, "id": 1 }'
|
jsoncommand = '{"jsonrpc": "2.0", "method": "VideoLibrary.SetTVShowDetails", "params": { "tvshowid": %i, "art": %s}, "id": 1 }'
|
||||||
|
@ -426,6 +428,8 @@ class WriteKodiDB():
|
||||||
|
|
||||||
artwork = {}
|
artwork = {}
|
||||||
artwork["poster"] = API().getArtwork(MBitem, "Primary")
|
artwork["poster"] = API().getArtwork(MBitem, "Primary")
|
||||||
|
|
||||||
|
if(item_type != "Episode"):
|
||||||
artwork["banner"] = API().getArtwork(MBitem, "Banner")
|
artwork["banner"] = API().getArtwork(MBitem, "Banner")
|
||||||
artwork["clearlogo"] = API().getArtwork(MBitem, "Logo")
|
artwork["clearlogo"] = API().getArtwork(MBitem, "Logo")
|
||||||
artwork["clearart"] = API().getArtwork(MBitem, "Art")
|
artwork["clearart"] = API().getArtwork(MBitem, "Art")
|
||||||
|
@ -462,8 +466,8 @@ class WriteKodiDB():
|
||||||
id = KodiItem['tvshowid']
|
id = KodiItem['tvshowid']
|
||||||
jsoncommand = '{"jsonrpc": "2.0", "method": "VideoLibrary.SetTVShowDetails", "params": { "tvshowid": %i, "art": %s}, "id": 1 }'
|
jsoncommand = '{"jsonrpc": "2.0", "method": "VideoLibrary.SetTVShowDetails", "params": { "tvshowid": %i, "art": %s}, "id": 1 }'
|
||||||
elif item_type == "Episode":
|
elif item_type == "Episode":
|
||||||
# episodes don't have any artwork - they derrive this from the tv show
|
id = KodiItem['episodeid']
|
||||||
return False
|
jsoncommand = '{"jsonrpc": "2.0", "method": "VideoLibrary.SetEpisodeDetails", "params": { "episodeid": %i, "art": %s}, "id": 1 }'
|
||||||
elif item_type == "MusicVideo":
|
elif item_type == "MusicVideo":
|
||||||
id = KodiItem['musicvideoid']
|
id = KodiItem['musicvideoid']
|
||||||
jsoncommand = '{"jsonrpc": "2.0", "method": "VideoLibrary.SetMusicVideoDetails", "params": { musicvideoid": %i, "art": %s}, "id": 1 }'
|
jsoncommand = '{"jsonrpc": "2.0", "method": "VideoLibrary.SetMusicVideoDetails", "params": { musicvideoid": %i, "art": %s}, "id": 1 }'
|
||||||
|
@ -476,6 +480,8 @@ class WriteKodiDB():
|
||||||
|
|
||||||
artwork = {}
|
artwork = {}
|
||||||
artwork["poster"] = API().getArtwork(MBitem, "Primary")
|
artwork["poster"] = API().getArtwork(MBitem, "Primary")
|
||||||
|
|
||||||
|
if(item_type != "Episode"):
|
||||||
artwork["banner"] = API().getArtwork(MBitem, "Banner")
|
artwork["banner"] = API().getArtwork(MBitem, "Banner")
|
||||||
artwork["clearlogo"] = API().getArtwork(MBitem, "Logo")
|
artwork["clearlogo"] = API().getArtwork(MBitem, "Logo")
|
||||||
artwork["clearart"] = API().getArtwork(MBitem, "Art")
|
artwork["clearart"] = API().getArtwork(MBitem, "Art")
|
||||||
|
|
Loading…
Reference in a new issue