Wipe all resume points before resyncing them
This commit is contained in:
parent
4df5851bc0
commit
7ce157accd
2 changed files with 9 additions and 0 deletions
|
@ -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((
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue