Revert "Fix playqueue monitoring locking mechanism"
This reverts commit 1e43f1cc77
.
- Should fix a racing condition if the playlist is cleared (picked up by both kodimonitor and playqueue monitor)
This commit is contained in:
parent
147d35ca24
commit
48810a227f
1 changed files with 15 additions and 21 deletions
|
@ -226,9 +226,6 @@ class PlayqueueMonitor(Thread):
|
|||
if stopped():
|
||||
break
|
||||
sleep(1000)
|
||||
work = []
|
||||
# Detect changed playqueues first, do the work afterwards
|
||||
with LOCK:
|
||||
for playqueue in PLAYQUEUES:
|
||||
kodi_pl = js.playlist_get_items(playqueue.playlistid)
|
||||
if playqueue.old_kodi_pl != kodi_pl:
|
||||
|
@ -239,13 +236,10 @@ class PlayqueueMonitor(Thread):
|
|||
LOG.debug('Not yet initiating playback')
|
||||
elif playqueue.pkc_edit:
|
||||
playqueue.pkc_edit = False
|
||||
LOG.debug('PKC edited the playqueue - skipping')
|
||||
LOG.debug('PKC just edited the playqueue - skipping')
|
||||
else:
|
||||
# We do need to update our playqueues
|
||||
work.append((playqueue, kodi_pl))
|
||||
playqueue.old_kodi_pl = kodi_pl
|
||||
# Now do the work - LOCK individual playqueue edits
|
||||
for playqueue, kodi_pl in work:
|
||||
# compare old and new playqueue
|
||||
self._compare_playqueues(playqueue, kodi_pl)
|
||||
playqueue.old_kodi_pl = list(kodi_pl)
|
||||
sleep(200)
|
||||
LOG.info("----===## PlayqueueMonitor stopped ##===----")
|
||||
|
|
Loading…
Reference in a new issue