mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-25 10:16:11 +00:00
fix for playcount sync
This commit is contained in:
parent
2968638220
commit
619ea2d876
1 changed files with 4 additions and 5 deletions
|
@ -67,7 +67,7 @@ class WriteKodiVideoDB():
|
|||
doUtils.downloadUrl(watchedurl, type = "DELETE")
|
||||
self.logMsg("Mark as unwatched for Id: %s, playcount: %s." % (emby_id, playcount), 1)
|
||||
# Erase any resume point associated
|
||||
self.setKodiResumePoint(id, 0, 0, cursor)
|
||||
self.setKodiResumePoint(id, 0, 0, cursor, playcount)
|
||||
finally:
|
||||
cursor.close
|
||||
|
||||
|
@ -825,7 +825,7 @@ class WriteKodiVideoDB():
|
|||
if cacheimage and imageType in ("fanart", "poster"):
|
||||
self.textureCache.CacheTexture(imageUrl)
|
||||
|
||||
def setKodiResumePoint(self, fileid, resume_seconds, total_seconds, cursor, playcount=None, dateplayed=None, realpath=None, realfile=None):
|
||||
def setKodiResumePoint(self, fileid, resume_seconds, total_seconds, cursor, playcount, dateplayed=None, realpath=None, realfile=None):
|
||||
|
||||
if realpath:
|
||||
#delete any existing resume point for the real filepath
|
||||
|
@ -842,7 +842,6 @@ class WriteKodiVideoDB():
|
|||
cursor.execute("DELETE FROM bookmark WHERE idFile = ?", (fileid,))
|
||||
|
||||
#set watched count
|
||||
if playcount:
|
||||
query = "UPDATE files SET playCount = ?, lastPlayed = ? WHERE idFile = ?"
|
||||
cursor.execute(query, (playcount, dateplayed, fileid))
|
||||
|
||||
|
|
Loading…
Reference in a new issue