Remove old saved views

This commit is contained in:
angelblue05 2016-02-23 00:27:49 -06:00
parent 81ea279319
commit dc74bf42aa

View file

@ -353,6 +353,13 @@ class LibrarySync(threading.Thread):
kodiconn = utils.kodiSQL('video') kodiconn = utils.kodiSQL('video')
kodicursor = kodiconn.cursor() 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 # Compare views, assign correct tags to items
self.maintainViews(embycursor, kodicursor) self.maintainViews(embycursor, kodicursor)