diff --git a/resources/lib/playbackutils.py b/resources/lib/playbackutils.py index 5408ecca..2a7d18a5 100644 --- a/resources/lib/playbackutils.py +++ b/resources/lib/playbackutils.py @@ -367,6 +367,7 @@ class PlaybackUtils(object): self.playlist.clear() started = False + index = max(self.playlist.getposition(), 0) + 1 # Can return -1 for item_id in item_ids: 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) - index = max(pbutils.playlist.getposition(), 0) + 1 # Can return -1 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 if not started: