Fix In Progress widgets not displaying anything and all shows being marked as watched

This commit is contained in:
croneter 2019-06-14 12:14:39 +02:00
parent fde67483f4
commit 12b84b42bb

View file

@ -611,8 +611,9 @@ class KodiVideoDB(common.KodiDBBase):
# Delete existing resume point # Delete existing resume point
self.cursor.execute('DELETE FROM bookmark WHERE idFile = ?', (file_id,)) self.cursor.execute('DELETE FROM bookmark WHERE idFile = ?', (file_id,))
# Set watched count # Set watched count
# Be careful to set playCount to None, NOT the int zero!
self.cursor.execute('UPDATE files SET playCount = ?, lastPlayed = ? WHERE idFile = ?', self.cursor.execute('UPDATE files SET playCount = ?, lastPlayed = ? WHERE idFile = ?',
(playcount, dateplayed, file_id)) (playcount or None, dateplayed, file_id))
# Set the resume bookmark # Set the resume bookmark
if resume_seconds: if resume_seconds:
self.cursor.execute( self.cursor.execute(