Mark movie as watched/unwatched
This commit is contained in:
parent
ca731ba41e
commit
b26b679dc1
1 changed files with 8 additions and 3 deletions
|
@ -13,6 +13,8 @@ import embydb_functions as embydb
|
||||||
import playbackutils as pbutils
|
import playbackutils as pbutils
|
||||||
import utils
|
import utils
|
||||||
|
|
||||||
|
from urllib import urlencode
|
||||||
|
|
||||||
#################################################################################################
|
#################################################################################################
|
||||||
|
|
||||||
|
|
||||||
|
@ -150,12 +152,15 @@ class KodiMonitor(xbmc.Monitor):
|
||||||
utils.window('emby_skipWatched%s' % itemid, clear=True)
|
utils.window('emby_skipWatched%s' % itemid, clear=True)
|
||||||
else:
|
else:
|
||||||
# notify the server
|
# notify the server
|
||||||
url = "{server}/emby/Users/{UserId}/PlayedItems/%s?format=json" % itemid
|
args = {'key': itemid,
|
||||||
|
'identifier': 'com.plexapp.plugins.library'}
|
||||||
if playcount != 0:
|
if playcount != 0:
|
||||||
doUtils.downloadUrl(url, type="POST")
|
url = "{server}/:/scrobble?" + urlencode(args)
|
||||||
|
doUtils.downloadUrl(url, type="GET")
|
||||||
self.logMsg("Mark as watched for itemid: %s" % itemid, 1)
|
self.logMsg("Mark as watched for itemid: %s" % itemid, 1)
|
||||||
else:
|
else:
|
||||||
doUtils.downloadUrl(url, type="DELETE")
|
url = "{server}/:/unscrobble?" + urlencode(args)
|
||||||
|
doUtils.downloadUrl(url, type="GET")
|
||||||
self.logMsg("Mark as unwatched for itemid: %s" % itemid, 1)
|
self.logMsg("Mark as unwatched for itemid: %s" % itemid, 1)
|
||||||
finally:
|
finally:
|
||||||
embycursor.close()
|
embycursor.close()
|
||||||
|
|
Loading…
Reference in a new issue