From 12b84b42bb31771e7da22254ef1456c03500eacc Mon Sep 17 00:00:00 2001 From: croneter Date: Fri, 14 Jun 2019 12:14:39 +0200 Subject: [PATCH] Fix In Progress widgets not displaying anything and all shows being marked as watched --- resources/lib/kodi_db/video.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/resources/lib/kodi_db/video.py b/resources/lib/kodi_db/video.py index 98fd92fb..fead84b7 100644 --- a/resources/lib/kodi_db/video.py +++ b/resources/lib/kodi_db/video.py @@ -611,8 +611,9 @@ class KodiVideoDB(common.KodiDBBase): # Delete existing resume point self.cursor.execute('DELETE FROM bookmark WHERE idFile = ?', (file_id,)) # Set watched count + # Be careful to set playCount to None, NOT the int zero! self.cursor.execute('UPDATE files SET playCount = ?, lastPlayed = ? WHERE idFile = ?', - (playcount, dateplayed, file_id)) + (playcount or None, dateplayed, file_id)) # Set the resume bookmark if resume_seconds: self.cursor.execute(