Fix play all out of order

This commit is contained in:
angelblue05 2018-04-20 01:46:58 -05:00
parent f19e268f1b
commit 1407a620ee

View file

@ -367,6 +367,7 @@ class PlaybackUtils(object):
self.playlist.clear() self.playlist.clear()
started = False started = False
index = max(self.playlist.getposition(), 0) + 1 # Can return -1
for item_id in item_ids: for item_id in item_ids:
listitem = xbmcgui.ListItem() listitem = xbmcgui.ListItem()
@ -394,9 +395,8 @@ class PlaybackUtils(object):
pbutils.set_playlist(play_url, item_id, listitem, seektime if item_ids.index(item_id) == 0 else None, db_id) pbutils.set_playlist(play_url, item_id, listitem, seektime if item_ids.index(item_id) == 0 else None, db_id)
index = max(pbutils.playlist.getposition(), 0) + 1 # Can return -1
for stack in pbutils.stack: for stack in pbutils.stack:
pbutils.playlist.add(url=stack[0], listitem=stack[1], index=index) self.playlist.add(url=stack[0], listitem=stack[1], index=index)
index += 1 index += 1
if not started: if not started: