jellyfin_kodi/{jellyfin/api,player}.py: Add missing "PlaySessionId" argument to close_transcode().

Without this argument, server always returns 400.
This commit is contained in:
jessbo 2021-08-29 15:45:40 -04:00
parent f3c2f1a7a5
commit 9b2d499a9c
2 changed files with 4 additions and 3 deletions

View file

@ -356,9 +356,10 @@ class API(object):
'LiveStreamId': live_id 'LiveStreamId': live_id
}) })
def close_transcode(self, device_id): def close_transcode(self, device_id, play_id):
return self._delete("Videos/ActiveEncodings", params={ return self._delete("Videos/ActiveEncodings", params={
'DeviceId': device_id 'DeviceId': device_id,
'PlaySessionId': play_id
}) })
def get_default_headers(self): def get_default_headers(self):

View file

@ -418,7 +418,7 @@ class Player(xbmc.Player):
elif item['PlayMethod'] == 'Transcode': elif item['PlayMethod'] == 'Transcode':
LOG.info("<[ transcode/%s ]", item['Id']) LOG.info("<[ transcode/%s ]", item['Id'])
item['Server'].jellyfin.close_transcode(item['DeviceId']) item['Server'].jellyfin.close_transcode(item['DeviceId'], item['PlaySessionId'])
path = xbmc.translatePath("special://profile/addon_data/plugin.video.jellyfin/temp/") path = xbmc.translatePath("special://profile/addon_data/plugin.video.jellyfin/temp/")