mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-25 02:06:09 +00:00
Fix playlist
This commit is contained in:
parent
7e2fdede83
commit
c77b8a93d9
1 changed files with 7 additions and 4 deletions
|
@ -174,10 +174,12 @@ class Actions(object):
|
||||||
|
|
||||||
''' Play a list of items. Creates a new playlist. Add additional items as plugin listing.
|
''' Play a list of items. Creates a new playlist. Add additional items as plugin listing.
|
||||||
'''
|
'''
|
||||||
item = items[0]
|
item = items['Items'][0]
|
||||||
playlist = self.get_playlist(item)
|
playlist = self.get_playlist(item)
|
||||||
player = xbmc.Player()
|
player = xbmc.Player()
|
||||||
|
|
||||||
|
#xbmc.executebuiltin("Playlist.Clear") # Clear playlist to remove the previous item from playlist position no.2
|
||||||
|
|
||||||
if clear:
|
if clear:
|
||||||
if player.isPlaying():
|
if player.isPlaying():
|
||||||
player.stop()
|
player.stop()
|
||||||
|
@ -208,11 +210,12 @@ class Actions(object):
|
||||||
xbmc.executebuiltin('Dialog.Close(busydialognocancel)')
|
xbmc.executebuiltin('Dialog.Close(busydialognocancel)')
|
||||||
player.play(playlist)
|
player.play(playlist)
|
||||||
|
|
||||||
for item in items[1:]:
|
for item in items['Items'][1:]:
|
||||||
listitem = xbmcgui.ListItem()
|
listitem = xbmcgui.ListItem()
|
||||||
LOG.info("[ playlist/%s ]", item)
|
LOG.info("[ playlist/%s ] %s", item['Id'], item['Name'])
|
||||||
|
|
||||||
path = "plugin://plugin.video.emby/?mode=play&id=%s&playlist=true" % item
|
self.set_listitem(item, listitem, None, False)
|
||||||
|
path = "plugin://plugin.video.emby/?mode=play&id=%s&playlist=true" % item['Id']
|
||||||
listitem.setPath(path)
|
listitem.setPath(path)
|
||||||
|
|
||||||
playlist.add(path, listitem, index)
|
playlist.add(path, listitem, index)
|
||||||
|
|
Loading…
Reference in a new issue