Wipe all resume points before resyncing them

This commit is contained in:
croneter 2018-02-15 20:15:53 +01:00
parent 4df5851bc0
commit 7ce157accd
2 changed files with 9 additions and 0 deletions

View file

@ -970,6 +970,12 @@ class Kodidb_Functions():
resume = None
return resume
def delete_all_playstates(self):
"""
Entirely resets the table bookmark and thus all resume points
"""
self.cursor.execute("DELETE FROM bookmark")
def addPlaystate(self, fileid, resume_seconds, total_seconds, playcount, dateplayed):
# Delete existing resume point
query = ' '.join((

View file

@ -247,6 +247,9 @@ class LibrarySync(Thread):
# Set views. Abort if unsuccessful
if not self.maintainViews():
return False
# Delete all existing resume points first
with kodidb.GetKodiDB('video') as kodi_db:
kodi_db.delete_all_playstates()
process = {
'movies': self.PlexMovies,