From f422e076a825fd0efeae81df00bf16c1d8f5693f Mon Sep 17 00:00:00 2001 From: angelblue05 Date: Sun, 17 May 2015 02:08:18 -0500 Subject: [PATCH] Follow up, Version bump 0.1.88 Added Emby behavior in Kodi - when marking unwatched, also erase any resume point. --- addon.xml | 2 +- resources/lib/WriteKodiVideoDB.py | 6 ++++++ resources/settings.xml | 5 ++--- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/addon.xml b/addon.xml index 633eff83..479331ed 100644 --- a/addon.xml +++ b/addon.xml @@ -1,7 +1,7 @@ diff --git a/resources/lib/WriteKodiVideoDB.py b/resources/lib/WriteKodiVideoDB.py index 38c9ba5f..eeb0ed30 100644 --- a/resources/lib/WriteKodiVideoDB.py +++ b/resources/lib/WriteKodiVideoDB.py @@ -46,6 +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) def addOrUpdateMovieToKodiLibrary( self, embyId ,connection, cursor, viewTag): diff --git a/resources/settings.xml b/resources/settings.xml index 80be2556..30cc59b8 100644 --- a/resources/settings.xml +++ b/resources/settings.xml @@ -13,12 +13,11 @@ - - + @@ -29,7 +28,7 @@ - +