Remove deleted PMS items immediately

This commit is contained in:
tomkat83 2016-10-23 16:55:28 +02:00
parent 18e6135afd
commit 2557260002

View file

@ -1394,9 +1394,10 @@ class LibrarySync(Thread):
now = getUnixTimestamp() now = getUnixTimestamp()
deleteListe = [] deleteListe = []
for i, item in enumerate(self.itemsToProcess): for i, item in enumerate(self.itemsToProcess):
if now - item['timestamp'] < self.saftyMargin: if (now - item['timestamp'] < self.saftyMargin and
item['state'] != 9):
# We haven't waited long enough for the PMS to finish # We haven't waited long enough for the PMS to finish
# processing the item. Do it later # processing the item. Do it later (excepting deletions)
continue continue
if item['state'] == 9: if item['state'] == 9:
successful = self.process_deleteditems(item) successful = self.process_deleteditems(item)