This commit is contained in:
Marcel van der Veldt 2015-03-19 22:50:49 +01:00
commit 3be9f9e50e
2 changed files with 27 additions and 0 deletions

View file

@ -113,6 +113,12 @@ class CreateFiles():
SubElement(root, "tag").text = tag
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")

View file

@ -87,6 +87,27 @@ class ReadEmbyDB():
result = result['Items']
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):
result = None