mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-11-10 04:06:11 +00:00
Fix source selection for direct stream
This commit is contained in:
parent
a5ffd8871b
commit
299e519cb7
1 changed files with 7 additions and 2 deletions
|
@ -112,6 +112,7 @@ class PlayUtils(object):
|
|||
selection.append(source.get('Name', "na"))
|
||||
|
||||
resp = dialog("select", _(33130), selection)
|
||||
|
||||
if resp > -1:
|
||||
source = sources[resp]
|
||||
else:
|
||||
|
@ -175,6 +176,7 @@ class PlayUtils(object):
|
|||
def get(self, source, audio=None, subtitle=None):
|
||||
|
||||
''' The server returns sources based on the MaxStreamingBitrate value and other filters.
|
||||
prop: embyfilename for ?? I thought it was to pass the real path to subtitle add-ons but it's not working?
|
||||
'''
|
||||
self.info['MediaSourceId'] = source['Id']
|
||||
|
||||
|
@ -199,6 +201,9 @@ class PlayUtils(object):
|
|||
self.info['SubtitleStreamIndex'] = self.info.get('SubtitleStreamIndex') or source.get('DefaultSubtitleStreamIndex')
|
||||
self.item['PlaybackInfo'].update(self.info)
|
||||
|
||||
API = api.API(self.item, self.info['ServerAddress'])
|
||||
window('embyfilename', value=API.get_file_path(source.get('Path')).encode('utf-8'))
|
||||
|
||||
def live_stream(self, source):
|
||||
|
||||
''' Get live stream media info.
|
||||
|
@ -259,8 +264,8 @@ class PlayUtils(object):
|
|||
source['Container'].split(',')[0],
|
||||
self.info['Token']))
|
||||
else:
|
||||
self.info['Path'] = ("%s/emby/Videos/%s/stream?static=true&api_key=%s" %
|
||||
(self.info['ServerAddress'], self.item['Id'], self.info['Token']))
|
||||
self.info['Path'] = ("%s/emby/Videos/%s/stream?static=true&MediaSourceId=%s&api_key=%s" %
|
||||
(self.info['ServerAddress'], self.item['Id'], source['Id'], self.info['Token']))
|
||||
|
||||
return self.info['Path']
|
||||
|
||||
|
|
Loading…
Reference in a new issue