Merge pull request #889 from croneter/fix-tvshows

Fix In Progress widgets being broken and tv shows showing up as completely watched
This commit is contained in:
croneter 2019-06-14 20:02:46 +02:00 committed by GitHub
commit d4f23db945
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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(