From 9528577aab8d785e0aed19845f6fc78af5c52be3 Mon Sep 17 00:00:00 2001 From: tomkat83 Date: Fri, 8 Apr 2016 14:11:50 +0200 Subject: [PATCH] Delete music items in full sync if not found on PMS --- resources/lib/librarysync.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/resources/lib/librarysync.py b/resources/lib/librarysync.py index df240f00..a08835e6 100644 --- a/resources/lib/librarysync.py +++ b/resources/lib/librarysync.py @@ -1230,6 +1230,13 @@ class LibrarySync(Thread): viewName, 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): # It returns True is database is up to date. False otherwise. self.logMsg("current: %s minimum: %s" % (current, minimum), 1)