def listSeasonsFromSeries(series_id):
url = skygo.baseUrl + '/sg/multiplatform/web/json/details/series/' + str(series_id) + '_global.json'
r = requests.get(url)
data = r.json()['serieRecap']['serie']
xbmcplugin.setContent(addon_handle, 'seasons')
for season in data['seasons']['season']:
url = common.build_url({'action': 'listSeason', 'id': season['id'], 'series_id': data['id']})
label = '%s - Staffel %02d' % (data['title'], season['nr'])
li = xbmcgui.ListItem(label=label)
li.setProperty('IsPlayable', 'false')
li.setArt({'poster': skygo.baseUrl + season['path'],
'fanart': getHeroImage(data)})
li.setInfo('video', {'plot': data['synopsis'].replace('\n', '').strip()})
xbmcplugin.addDirectoryItem(handle=addon_handle, url=url,
listitem=li, isFolder=True)
xbmcplugin.addSortMethod(handle=addon_handle, sortMethod=xbmcplugin.SORT_METHOD_NONE)
xbmcplugin.addSortMethod(handle=addon_handle, sortMethod=xbmcplugin.SORT_METHOD_TITLE)
xbmcplugin.addSortMethod(handle=addon_handle, sortMethod=xbmcplugin.SORT_METHOD_LABEL)
xbmcplugin.addSortMethod(handle=addon_handle, sortMethod=xbmcplugin.SORT_METHOD_VIDEO_YEAR)
xbmcplugin.endOfDirectory(addon_handle, cacheToDisc=True)
评论列表
文章目录