Lock playqueue activities
This commit is contained in:
parent
0f9e754815
commit
a650c42cfd
1 changed files with 13 additions and 8 deletions
|
@ -342,7 +342,19 @@ class QueuePlay(backgroundthread.KillableThread):
|
|||
return playqueue, video_widget_playback
|
||||
|
||||
def run(self):
|
||||
with app.APP.lock_playqueues:
|
||||
LOG.debug('##===---- Starting QueuePlay ----===##')
|
||||
try:
|
||||
self._run()
|
||||
finally:
|
||||
utils.window('plex.playlist.ready', clear=True)
|
||||
utils.window('plex.playlist.start', clear=True)
|
||||
app.PLAYSTATE.initiated_by_plex = False
|
||||
self.server.threads.remove(self)
|
||||
self.server.pending = []
|
||||
LOG.debug('##===---- QueuePlay Stopped ----===##')
|
||||
|
||||
def _run(self):
|
||||
abort = False
|
||||
play_folder = False
|
||||
playqueue, video_widget_playback = self._get_playqueue()
|
||||
|
@ -439,10 +451,3 @@ class QueuePlay(backgroundthread.KillableThread):
|
|||
else:
|
||||
utils.window('plex.playlist.aborted', value='true')
|
||||
break
|
||||
|
||||
utils.window('plex.playlist.ready', clear=True)
|
||||
utils.window('plex.playlist.start', clear=True)
|
||||
app.PLAYSTATE.initiated_by_plex = False
|
||||
self.server.threads.remove(self)
|
||||
self.server.pending = []
|
||||
LOG.debug('##===---- QueuePlay Stopped ----===##')
|
||||
|
|
Loading…
Reference in a new issue