mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-11-10 04:06:11 +00:00
Switch order for watched
I have been testing for the past two days. it seems to work better this way. That is until marcelveldt has time to go over this :) Thanks, and I'm off!
This commit is contained in:
parent
9197e274d2
commit
ced36a8de5
1 changed files with 8 additions and 7 deletions
|
@ -39,13 +39,6 @@ class WriteKodiVideoDB():
|
||||||
cursor.close
|
cursor.close
|
||||||
|
|
||||||
if(emby_id != None):
|
if(emby_id != None):
|
||||||
addon = xbmcaddon.Addon(id='plugin.video.emby')
|
|
||||||
downloadUtils = DownloadUtils()
|
|
||||||
watchedurl = "{server}/mediabrowser/Users/{UserId}/PlayedItems/%s" % emby_id
|
|
||||||
if playcount != 0:
|
|
||||||
downloadUtils.downloadUrl(watchedurl, type="POST")
|
|
||||||
else:
|
|
||||||
downloadUtils.downloadUrl(watchedurl, type="DELETE")
|
|
||||||
# Erase resume point when user marks watched/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.
|
# Also force sets the playcount to instantly reflect the appropriate playstate.
|
||||||
if type == "episode":
|
if type == "episode":
|
||||||
|
@ -54,6 +47,14 @@ class WriteKodiVideoDB():
|
||||||
resume = '{"jsonrpc": "2.0", "method": "VideoLibrary.SetMovieDetails", "params": {"movieid": %d, "playcount": %d, "resume": {"position": 0}}, "id": "setResumePoint"}' % (id, playcount)
|
resume = '{"jsonrpc": "2.0", "method": "VideoLibrary.SetMovieDetails", "params": {"movieid": %d, "playcount": %d, "resume": {"position": 0}}, "id": "setResumePoint"}' % (id, playcount)
|
||||||
xbmc.executeJSONRPC(resume)
|
xbmc.executeJSONRPC(resume)
|
||||||
|
|
||||||
|
addon = xbmcaddon.Addon(id='plugin.video.emby')
|
||||||
|
downloadUtils = DownloadUtils()
|
||||||
|
watchedurl = "{server}/mediabrowser/Users/{UserId}/PlayedItems/%s" % emby_id
|
||||||
|
if playcount != 0:
|
||||||
|
downloadUtils.downloadUrl(watchedurl, type="POST")
|
||||||
|
else:
|
||||||
|
downloadUtils.downloadUrl(watchedurl, type="DELETE")
|
||||||
|
|
||||||
def addOrUpdateMovieToKodiLibrary( self, embyId ,connection, cursor, viewTag):
|
def addOrUpdateMovieToKodiLibrary( self, embyId ,connection, cursor, viewTag):
|
||||||
|
|
||||||
addon = xbmcaddon.Addon(id='plugin.video.emby')
|
addon = xbmcaddon.Addon(id='plugin.video.emby')
|
||||||
|
|
Loading…
Reference in a new issue