Don't empty entire playqueue on Kodi exit
This commit is contained in:
parent
3174521475
commit
57ec06ae4d
1 changed files with 4 additions and 0 deletions
|
@ -186,6 +186,10 @@ class PlayqueueMonitor(Thread):
|
||||||
for j in range(i, len(index)):
|
for j in range(i, len(index)):
|
||||||
index[j] += 1
|
index[j] += 1
|
||||||
for i in reversed(index):
|
for i in reversed(index):
|
||||||
|
if self.thread_stopped():
|
||||||
|
# Chances are that we got an empty Kodi playlist due to
|
||||||
|
# Kodi exit
|
||||||
|
return
|
||||||
LOG.debug('Detected deletion of playqueue element at pos %s', i)
|
LOG.debug('Detected deletion of playqueue element at pos %s', i)
|
||||||
PL.delete_playlist_item_from_PMS(playqueue, i)
|
PL.delete_playlist_item_from_PMS(playqueue, i)
|
||||||
LOG.debug('Done comparing playqueues')
|
LOG.debug('Done comparing playqueues')
|
||||||
|
|
Loading…
Reference in a new issue