Shut down libsync thread correctly
This commit is contained in:
parent
05247d99cb
commit
15a39f9e64
1 changed files with 3 additions and 0 deletions
|
@ -1432,6 +1432,9 @@ class LibrarySync(Thread):
|
||||||
now = getUnixTimestamp()
|
now = getUnixTimestamp()
|
||||||
deleteListe = []
|
deleteListe = []
|
||||||
for i, item in enumerate(self.itemsToProcess):
|
for i, item in enumerate(self.itemsToProcess):
|
||||||
|
if self.threadStopped():
|
||||||
|
# Chances are that Kodi gets shut down
|
||||||
|
break
|
||||||
if item['state'] == 9:
|
if item['state'] == 9:
|
||||||
successful = self.process_deleteditems(item)
|
successful = self.process_deleteditems(item)
|
||||||
elif now - item['timestamp'] < self.saftyMargin:
|
elif now - item['timestamp'] < self.saftyMargin:
|
||||||
|
|
Loading…
Reference in a new issue