mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-24 09:46:11 +00:00
Add showtitle and episodeno to label2
for listitem
This commit is contained in:
parent
21e7a9cada
commit
4a3be4d628
1 changed files with 9 additions and 4 deletions
|
@ -818,6 +818,7 @@ def BrowseChannels(itemid, folderid=None):
|
||||||
def createListItem(item):
|
def createListItem(item):
|
||||||
|
|
||||||
title = item['title']
|
title = item['title']
|
||||||
|
label2 = ""
|
||||||
li = xbmcgui.ListItem(title)
|
li = xbmcgui.ListItem(title)
|
||||||
li.setProperty('IsPlayable', "true")
|
li.setProperty('IsPlayable', "true")
|
||||||
|
|
||||||
|
@ -829,6 +830,10 @@ def createListItem(item):
|
||||||
'Playcount': item['playcount']
|
'Playcount': item['playcount']
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if "showtitle" in item:
|
||||||
|
metadata['TVshowTitle'] = item['showtitle']
|
||||||
|
label2 = item['showtitle']
|
||||||
|
|
||||||
if "episodeid" in item:
|
if "episodeid" in item:
|
||||||
# Listitem of episode
|
# Listitem of episode
|
||||||
metadata['mediatype'] = "episode"
|
metadata['mediatype'] = "episode"
|
||||||
|
@ -844,14 +849,13 @@ def createListItem(item):
|
||||||
metadata['Season'] = season
|
metadata['Season'] = season
|
||||||
|
|
||||||
if season and episode:
|
if season and episode:
|
||||||
li.setProperty('episodeno', "s%.2de%.2d" % (season, episode))
|
episodeno = "s%.2de%.2d" % (season, episode)
|
||||||
|
li.setProperty('episodeno', episodeno)
|
||||||
|
label2 = "%s - %s" % (label2, episodeno) if label2 else episodeno
|
||||||
|
|
||||||
if "firstaired" in item:
|
if "firstaired" in item:
|
||||||
metadata['Premiered'] = item['firstaired']
|
metadata['Premiered'] = item['firstaired']
|
||||||
|
|
||||||
if "showtitle" in item:
|
|
||||||
metadata['TVshowTitle'] = item['showtitle']
|
|
||||||
|
|
||||||
if "rating" in item:
|
if "rating" in item:
|
||||||
metadata['Rating'] = str(round(float(item['rating']),1))
|
metadata['Rating'] = str(round(float(item['rating']),1))
|
||||||
|
|
||||||
|
@ -871,6 +875,7 @@ def createListItem(item):
|
||||||
metadata['Cast'] = cast
|
metadata['Cast'] = cast
|
||||||
metadata['CastAndRole'] = castandrole
|
metadata['CastAndRole'] = castandrole
|
||||||
|
|
||||||
|
li.setLabel2(label2)
|
||||||
li.setInfo(type="Video", infoLabels=metadata)
|
li.setInfo(type="Video", infoLabels=metadata)
|
||||||
li.setProperty('resumetime', str(item['resume']['position']))
|
li.setProperty('resumetime', str(item['resume']['position']))
|
||||||
li.setProperty('totaltime', str(item['resume']['total']))
|
li.setProperty('totaltime', str(item['resume']['total']))
|
||||||
|
|
Loading…
Reference in a new issue