mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-25 18:26:15 +00:00
Prepare for Krypton listitem
This commit is contained in:
parent
9d5980d08a
commit
984873060a
1 changed files with 12 additions and 1 deletions
|
@ -64,6 +64,8 @@ class PlaybackUtils():
|
||||||
self.setProperties(playurl, listitem)
|
self.setProperties(playurl, listitem)
|
||||||
return xbmcplugin.setResolvedUrl(int(sys.argv[1]), True, listitem)
|
return xbmcplugin.setResolvedUrl(int(sys.argv[1]), True, listitem)
|
||||||
|
|
||||||
|
# TODO: Review once Krypton is RC, no need for workaround.
|
||||||
|
|
||||||
############### ORGANIZE CURRENT PLAYLIST ################
|
############### ORGANIZE CURRENT PLAYLIST ################
|
||||||
|
|
||||||
homeScreen = xbmc.getCondVisibility('Window.IsActive(home)')
|
homeScreen = xbmc.getCondVisibility('Window.IsActive(home)')
|
||||||
|
@ -344,7 +346,7 @@ class PlaybackUtils():
|
||||||
else:
|
else:
|
||||||
listItem.setArt({arttype: path})
|
listItem.setArt({arttype: path})
|
||||||
|
|
||||||
def setListItem(self, listItem):
|
def setListItem(self, listItem, dbid=None):
|
||||||
|
|
||||||
people = self.API.get_people()
|
people = self.API.get_people()
|
||||||
studios = self.API.get_studios()
|
studios = self.API.get_studios()
|
||||||
|
@ -366,6 +368,10 @@ class PlaybackUtils():
|
||||||
|
|
||||||
if "Episode" in self.item['Type']:
|
if "Episode" in self.item['Type']:
|
||||||
# Only for tv shows
|
# Only for tv shows
|
||||||
|
# For Kodi Krypton
|
||||||
|
metadata['mediatype'] = "episode"
|
||||||
|
metadata['dbid'] = dbid
|
||||||
|
|
||||||
thumbId = self.item.get('SeriesId')
|
thumbId = self.item.get('SeriesId')
|
||||||
season = self.item.get('ParentIndexNumber', -1)
|
season = self.item.get('ParentIndexNumber', -1)
|
||||||
episode = self.item.get('IndexNumber', -1)
|
episode = self.item.get('IndexNumber', -1)
|
||||||
|
@ -375,6 +381,11 @@ class PlaybackUtils():
|
||||||
metadata['season'] = season
|
metadata['season'] = season
|
||||||
metadata['episode'] = episode
|
metadata['episode'] = episode
|
||||||
|
|
||||||
|
if "Movie" in self.item['Type']:
|
||||||
|
# For Kodi Krypton
|
||||||
|
metadata['mediatype'] = "movie"
|
||||||
|
metadata['dbid'] = dbid
|
||||||
|
|
||||||
listItem.setProperty('IsPlayable', 'true')
|
listItem.setProperty('IsPlayable', 'true')
|
||||||
listItem.setProperty('IsFolder', 'false')
|
listItem.setProperty('IsFolder', 'false')
|
||||||
listItem.setLabel(metadata['title'])
|
listItem.setLabel(metadata['title'])
|
||||||
|
|
Loading…
Reference in a new issue