mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-25 02:06:09 +00:00
Fix playcount
Remove duplicate api_key and MediaSourceId in stream transcode url
This commit is contained in:
parent
1051d415a5
commit
5502f4b0b3
3 changed files with 5 additions and 3 deletions
|
@ -167,13 +167,13 @@ class KodiMonitor(xbmc.Monitor):
|
|||
item_id = self._get_item_id(kodi_id, item_type)
|
||||
if item_id:
|
||||
# Stop from manually marking as watched unwatched, with actual playback.
|
||||
if window('emby.skip.%s' % item_id) == "true":
|
||||
if window('emby.skip.%s' % item_id):
|
||||
# property is set in player.py
|
||||
window('emby.skip.%s' % item_id, clear=True)
|
||||
else:
|
||||
# notify the server
|
||||
url = "{server}/emby/Users/{UserId}/PlayedItems/%s?format=json" % item_id
|
||||
if data.get('playcount') != 0:
|
||||
if data.get('playcount'):
|
||||
self.download(url, action_type="POST")
|
||||
log.info("Mark as watched for itemid: %s", item_id)
|
||||
else:
|
||||
|
|
|
@ -453,6 +453,8 @@ class Player(xbmc.Player):
|
|||
media_type = data['Type']
|
||||
playMethod = data['playmethod']
|
||||
|
||||
window('emby.skip.%s' % itemid, value="true")
|
||||
|
||||
self.stop_playback(data)
|
||||
|
||||
if currentPosition and runtime:
|
||||
|
|
|
@ -276,7 +276,7 @@ class PlayUtils():
|
|||
base, params = source['TranscodingUrl'].split("?")
|
||||
url_parsed = params.split("&")
|
||||
for i in url_parsed:
|
||||
if 'AudioStreamIndex' in i or 'AudioBitrate' in i: #handle manually
|
||||
if 'AudioStreamIndex' in i or 'AudioBitrate' in i or 'PlaySessionId' in i or 'MediaSourceId' in i or 'api_key' in i: #handle manually
|
||||
url_parsed.remove(i)
|
||||
url = "%s/emby%s?%s" % (self.server, base.replace("stream", "master"), '&'.join(url_parsed))
|
||||
else:
|
||||
|
|
Loading…
Reference in a new issue