From f3dfeb7653fc40b8df837253cfe3fcfafbf28360 Mon Sep 17 00:00:00 2001 From: angelblue05 Date: Sun, 17 May 2015 22:04:24 -0500 Subject: [PATCH] Force playstate to appear immediately Just incase there's something holding the process. To be reviewed at a later time. --- resources/lib/WriteKodiVideoDB.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/resources/lib/WriteKodiVideoDB.py b/resources/lib/WriteKodiVideoDB.py index f96ef14e..361c34fc 100644 --- a/resources/lib/WriteKodiVideoDB.py +++ b/resources/lib/WriteKodiVideoDB.py @@ -46,11 +46,12 @@ class WriteKodiVideoDB(): downloadUtils.downloadUrl(watchedurl, type="POST") else: downloadUtils.downloadUrl(watchedurl, type="DELETE") - # Erase resume point when user marks unwatched to follow Emby behavior + # Erase resume point when user marks watched/unwatched to follow Emby behavior + # Also force sets the playcount to instantly reflect the appropriate playstate. if type == "episode": - resume = '{"jsonrpc": "2.0", "method": "VideoLibrary.SetEpisodeDetails", "params": {"episodeid": %d, "resume": {"position": 0}}, "id": "setResumePoint"}' % id + resume = '{"jsonrpc": "2.0", "method": "VideoLibrary.SetEpisodeDetails", "params": {"episodeid": %d, "playcount": %d, "resume": {"position": 0}}, "id": "setResumePoint"}' % (id, playcount) elif type == "movie": - resume = '{"jsonrpc": "2.0", "method": "VideoLibrary.SetMovieDetails", "params": {"movieid": %d, "resume": {"position": 0}}, "id": "setResumePoint"}' % id + resume = '{"jsonrpc": "2.0", "method": "VideoLibrary.SetMovieDetails", "params": {"movieid": %d, "playcount": %d, "resume": {"position": 0}}, "id": "setResumePoint"}' % (id, playcount) xbmc.executeJSONRPC(resume) def addOrUpdateMovieToKodiLibrary( self, embyId ,connection, cursor, viewTag):