From dc74bf42aa2a397f0305b299c591434b0f1e4fde Mon Sep 17 00:00:00 2001 From: angelblue05 Date: Tue, 23 Feb 2016 00:27:49 -0600 Subject: [PATCH] Remove old saved views --- resources/lib/librarysync.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/resources/lib/librarysync.py b/resources/lib/librarysync.py index 3b966ece..33c1691e 100644 --- a/resources/lib/librarysync.py +++ b/resources/lib/librarysync.py @@ -353,6 +353,13 @@ class LibrarySync(threading.Thread): kodiconn = utils.kodiSQL('video') kodicursor = kodiconn.cursor() + # Erase saved views + embycursor.execute('SELECT tbl_name FROM sqlite_master WHERE type="table"') + rows = embycursor.fetchall() + for row in rows: + tablename = row[0] + if tablename == "view": + embycursor.execute("DELETE FROM " + tablename) # Compare views, assign correct tags to items self.maintainViews(embycursor, kodicursor)