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
|
resume = None
|
||||||
return resume
|
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):
|
def addPlaystate(self, fileid, resume_seconds, total_seconds, playcount, dateplayed):
|
||||||
# Delete existing resume point
|
# Delete existing resume point
|
||||||
query = ' '.join((
|
query = ' '.join((
|
||||||
|
|
|
@ -247,6 +247,9 @@ class LibrarySync(Thread):
|
||||||
# Set views. Abort if unsuccessful
|
# Set views. Abort if unsuccessful
|
||||||
if not self.maintainViews():
|
if not self.maintainViews():
|
||||||
return False
|
return False
|
||||||
|
# Delete all existing resume points first
|
||||||
|
with kodidb.GetKodiDB('video') as kodi_db:
|
||||||
|
kodi_db.delete_all_playstates()
|
||||||
|
|
||||||
process = {
|
process = {
|
||||||
'movies': self.PlexMovies,
|
'movies': self.PlexMovies,
|
||||||
|
|
Loading…
Reference in a new issue