Fix playlist being cleared when it shouldn't
This commit is contained in:
parent
e87db5c672
commit
2f1b104b41
2 changed files with 7 additions and 3 deletions
|
@ -91,15 +91,20 @@ class PlaybackUtils():
|
|||
homeScreen = (xbmc.getCondVisibility('Window.IsActive(home)') or
|
||||
contextmenu_play)
|
||||
kodiPl = self.pl.playlist
|
||||
# Can return -1
|
||||
startPos = max(kodiPl.getposition(), 0)
|
||||
sizePlaylist = kodiPl.size()
|
||||
if contextmenu_play:
|
||||
# Need to start with the items we're inserting here
|
||||
startPos = sizePlaylist
|
||||
else:
|
||||
# Can return -1
|
||||
startPos = max(kodiPl.getposition(), 0)
|
||||
self.currentPosition = startPos
|
||||
|
||||
propertiesPlayback = window('plex_playbackProps') == "true"
|
||||
introsPlaylist = False
|
||||
dummyPlaylist = False
|
||||
|
||||
log.info("Playing from contextmenu: %s" % contextmenu_play)
|
||||
log.info("Playlist start position: %s" % startPos)
|
||||
log.info("Playlist plugin position: %s" % self.currentPosition)
|
||||
log.info("Playlist size: %s" % sizePlaylist)
|
||||
|
|
|
@ -82,7 +82,6 @@ class Playlist():
|
|||
log.info('Empty playlist initiated')
|
||||
if self.playlist is not None:
|
||||
self.playlistId = self.playlist.getPlayListId()
|
||||
self.playlist.clear()
|
||||
|
||||
@lockMethod.decorate
|
||||
def getQueueIdFromPosition(self, playlistPosition):
|
||||
|
|
Loading…
Add table
Reference in a new issue