Move check whether Kodi quit
This commit is contained in:
parent
88d1623909
commit
8e70955ded
1 changed files with 4 additions and 4 deletions
|
@ -146,16 +146,16 @@ class Playqueue(Thread):
|
||||||
index = list(range(0, len(old)))
|
index = list(range(0, len(old)))
|
||||||
log.debug('Comparing new Kodi playqueue %s with our play queue %s'
|
log.debug('Comparing new Kodi playqueue %s with our play queue %s'
|
||||||
% (new, old))
|
% (new, old))
|
||||||
|
if self.thread_stopped():
|
||||||
|
# Chances are that we got an empty Kodi playlist due to
|
||||||
|
# Kodi exit
|
||||||
|
return
|
||||||
for i, new_item in enumerate(new):
|
for i, new_item in enumerate(new):
|
||||||
if (new_item['file'].startswith('plugin://') and
|
if (new_item['file'].startswith('plugin://') and
|
||||||
not new_item['file'].startswith(PLUGIN)):
|
not new_item['file'].startswith(PLUGIN)):
|
||||||
# Ignore new media added by other addons
|
# Ignore new media added by other addons
|
||||||
continue
|
continue
|
||||||
for j, old_item in enumerate(old):
|
for j, old_item in enumerate(old):
|
||||||
if self.thread_stopped():
|
|
||||||
# Chances are that we got an empty Kodi playlist due to
|
|
||||||
# Kodi exit
|
|
||||||
return
|
|
||||||
try:
|
try:
|
||||||
if (old_item.file.startswith('plugin://') and
|
if (old_item.file.startswith('plugin://') and
|
||||||
not old_item['file'].startswith(PLUGIN)):
|
not old_item['file'].startswith(PLUGIN)):
|
||||||
|
|
Loading…
Add table
Reference in a new issue