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