From d0bee543a15f8fe3afb0eabc189a558f8c814617 Mon Sep 17 00:00:00 2001 From: angelblue05 Date: Sun, 17 May 2015 02:50:33 -0500 Subject: [PATCH] Reset resume on mark watched and unwatched Emby behavior for manually marking watch state --- resources/lib/WriteKodiVideoDB.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/resources/lib/WriteKodiVideoDB.py b/resources/lib/WriteKodiVideoDB.py index eeb0ed30..f96ef14e 100644 --- a/resources/lib/WriteKodiVideoDB.py +++ b/resources/lib/WriteKodiVideoDB.py @@ -46,12 +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 - if type == "episode": - resume = '{"jsonrpc": "2.0", "method": "VideoLibrary.SetEpisodeDetails", "params": {"episodeid": %d, "resume": {"position": 0}}, "id": "setResumePoint"}' % id - elif type == "movie": - resume = '{"jsonrpc": "2.0", "method": "VideoLibrary.SetMovieDetails", "params": {"movieid": %d, "resume": {"position": 0}}, "id": "setResumePoint"}' % id - xbmc.executeJSONRPC(resume) + # Erase resume point when user marks unwatched to follow Emby behavior + if type == "episode": + resume = '{"jsonrpc": "2.0", "method": "VideoLibrary.SetEpisodeDetails", "params": {"episodeid": %d, "resume": {"position": 0}}, "id": "setResumePoint"}' % id + elif type == "movie": + resume = '{"jsonrpc": "2.0", "method": "VideoLibrary.SetMovieDetails", "params": {"movieid": %d, "resume": {"position": 0}}, "id": "setResumePoint"}' % id + xbmc.executeJSONRPC(resume) def addOrUpdateMovieToKodiLibrary( self, embyId ,connection, cursor, viewTag):