mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-25 10:16:11 +00:00
Merge branch 'master' of https://github.com/marcelveldt/plugin.video.mb3sync
This commit is contained in:
commit
3be9f9e50e
2 changed files with 27 additions and 0 deletions
|
@ -113,6 +113,12 @@ class CreateFiles():
|
||||||
SubElement(root, "tag").text = tag
|
SubElement(root, "tag").text = tag
|
||||||
|
|
||||||
SubElement(root, "thumb").text = API().getArtwork(item, "Primary")
|
SubElement(root, "thumb").text = API().getArtwork(item, "Primary")
|
||||||
|
if item_type == 'Series':
|
||||||
|
seasonData = ReadEmbyDB().getTVShowSeasons(item["Id"])
|
||||||
|
if seasonData != None:
|
||||||
|
for season in seasonData:
|
||||||
|
SubElement(root, "thumb",{"type":"season","season":str(season["IndexNumber"])}).text = API().getArtwork(season, "Primary")
|
||||||
|
|
||||||
SubElement(root, "fanart").text = API().getArtwork(item, "Backdrop")
|
SubElement(root, "fanart").text = API().getArtwork(item, "Backdrop")
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -87,6 +87,27 @@ class ReadEmbyDB():
|
||||||
result = result['Items']
|
result = result['Items']
|
||||||
|
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
def getTVShowSeasons(self, tvShowId):
|
||||||
|
result = None
|
||||||
|
|
||||||
|
addon = xbmcaddon.Addon(id='plugin.video.mb3sync')
|
||||||
|
port = addon.getSetting('port')
|
||||||
|
host = addon.getSetting('ipaddress')
|
||||||
|
server = host + ":" + port
|
||||||
|
|
||||||
|
downloadUtils = DownloadUtils()
|
||||||
|
userid = downloadUtils.getUserId()
|
||||||
|
|
||||||
|
url = 'http://' + server + '/Shows/' + tvShowId + '/Seasons?UserId=' + userid + '&format=json&ImageTypeLimit=1'
|
||||||
|
|
||||||
|
jsonData = downloadUtils.downloadUrl(url, suppress=True, popup=0)
|
||||||
|
if jsonData != None and jsonData != "":
|
||||||
|
result = json.loads(jsonData)
|
||||||
|
if(result.has_key('Items')):
|
||||||
|
result = result['Items']
|
||||||
|
|
||||||
|
return result
|
||||||
|
|
||||||
def getEpisodes(self, showId, fullinfo = False):
|
def getEpisodes(self, showId, fullinfo = False):
|
||||||
result = None
|
result = None
|
||||||
|
|
Loading…
Reference in a new issue