From 15a39f9e648aed5bc451b3bd6ce2936070ba93df Mon Sep 17 00:00:00 2001 From: tomkat83 Date: Thu, 2 Feb 2017 14:49:14 +0100 Subject: [PATCH] Shut down libsync thread correctly --- resources/lib/librarysync.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/resources/lib/librarysync.py b/resources/lib/librarysync.py index 5b627cc0..ad1bb06e 100644 --- a/resources/lib/librarysync.py +++ b/resources/lib/librarysync.py @@ -1432,6 +1432,9 @@ class LibrarySync(Thread): now = getUnixTimestamp() deleteListe = [] for i, item in enumerate(self.itemsToProcess): + if self.threadStopped(): + # Chances are that Kodi gets shut down + break if item['state'] == 9: successful = self.process_deleteditems(item) elif now - item['timestamp'] < self.saftyMargin: