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:
angelblue05 2015-05-24 00:56:31 -05:00
parent 9197e274d2
commit ced36a8de5
1 changed files with 8 additions and 7 deletions

View File

@ -39,13 +39,6 @@ class WriteKodiVideoDB():
cursor.close
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
# Also force sets the playcount to instantly reflect the appropriate playstate.
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)
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):
addon = xbmcaddon.Addon(id='plugin.video.emby')