Delete music items in full sync if not found on PMS

This commit is contained in:
tomkat83 2016-04-08 14:11:50 +02:00
parent 24bb637606
commit 9528577aab

View file

@ -1230,6 +1230,13 @@ class LibrarySync(Thread):
viewName, viewName,
viewId) viewId)
if self.compare:
# Manual sync, process deletes
with itemtypes.Music() as Music:
for itemid in self.allKodiElementsId:
if itemid not in self.allPlexElementsId:
Music.remove(itemid)
def compareDBVersion(self, current, minimum): def compareDBVersion(self, current, minimum):
# It returns True is database is up to date. False otherwise. # It returns True is database is up to date. False otherwise.
self.logMsg("current: %s minimum: %s" % (current, minimum), 1) self.logMsg("current: %s minimum: %s" % (current, minimum), 1)