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
|
homeScreen = (xbmc.getCondVisibility('Window.IsActive(home)') or
|
||||||
contextmenu_play)
|
contextmenu_play)
|
||||||
kodiPl = self.pl.playlist
|
kodiPl = self.pl.playlist
|
||||||
|
sizePlaylist = kodiPl.size()
|
||||||
|
if contextmenu_play:
|
||||||
|
# Need to start with the items we're inserting here
|
||||||
|
startPos = sizePlaylist
|
||||||
|
else:
|
||||||
# Can return -1
|
# Can return -1
|
||||||
startPos = max(kodiPl.getposition(), 0)
|
startPos = max(kodiPl.getposition(), 0)
|
||||||
sizePlaylist = kodiPl.size()
|
|
||||||
self.currentPosition = startPos
|
self.currentPosition = startPos
|
||||||
|
|
||||||
propertiesPlayback = window('plex_playbackProps') == "true"
|
propertiesPlayback = window('plex_playbackProps') == "true"
|
||||||
introsPlaylist = False
|
introsPlaylist = False
|
||||||
dummyPlaylist = False
|
dummyPlaylist = False
|
||||||
|
|
||||||
|
log.info("Playing from contextmenu: %s" % contextmenu_play)
|
||||||
log.info("Playlist start position: %s" % startPos)
|
log.info("Playlist start position: %s" % startPos)
|
||||||
log.info("Playlist plugin position: %s" % self.currentPosition)
|
log.info("Playlist plugin position: %s" % self.currentPosition)
|
||||||
log.info("Playlist size: %s" % sizePlaylist)
|
log.info("Playlist size: %s" % sizePlaylist)
|
||||||
|
|
|
@ -82,7 +82,6 @@ class Playlist():
|
||||||
log.info('Empty playlist initiated')
|
log.info('Empty playlist initiated')
|
||||||
if self.playlist is not None:
|
if self.playlist is not None:
|
||||||
self.playlistId = self.playlist.getPlayListId()
|
self.playlistId = self.playlist.getPlayListId()
|
||||||
self.playlist.clear()
|
|
||||||
|
|
||||||
@lockMethod.decorate
|
@lockMethod.decorate
|
||||||
def getQueueIdFromPosition(self, playlistPosition):
|
def getQueueIdFromPosition(self, playlistPosition):
|
||||||
|
|
Loading…
Add table
Reference in a new issue