mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-11-13 21:56:11 +00:00
Fix typo subtitles transcode
This commit is contained in:
parent
307bb772b3
commit
106e6e849d
1 changed files with 7 additions and 4 deletions
|
@ -68,6 +68,9 @@ class PlayUtils():
|
||||||
# Log filename, used by other addons eg subtitles which require the file name
|
# Log filename, used by other addons eg subtitles which require the file name
|
||||||
window('embyfilename', value=url)
|
window('embyfilename', value=url)
|
||||||
|
|
||||||
|
if 'RequiredHttpHeaders' in info and 'User-Agent' in info['RequiredHttpHeaders']:
|
||||||
|
self.listitem.setProperty('User-Agent', info['RequiredHttpHeaders']['User-Agent'])
|
||||||
|
|
||||||
log.info("playback info: %s", info)
|
log.info("playback info: %s", info)
|
||||||
log.info("play method: %s play url: %s", self.method, url)
|
log.info("play method: %s play url: %s", self.method, url)
|
||||||
|
|
||||||
|
@ -129,9 +132,9 @@ class PlayUtils():
|
||||||
log.info("No media source selected.")
|
log.info("No media source selected.")
|
||||||
return False
|
return False
|
||||||
|
|
||||||
return self.get_optimal_source(selected_source)
|
return self.get_optimal_track(selected_source)
|
||||||
|
|
||||||
def get_optimal_source(self, source):
|
def get_optimal_track(self, source):
|
||||||
|
|
||||||
''' Because we posted our deviceprofile to the server, only streams will be
|
''' Because we posted our deviceprofile to the server, only streams will be
|
||||||
returned that can actually be played by this client so no need to check bitrates etc.
|
returned that can actually be played by this client so no need to check bitrates etc.
|
||||||
|
@ -142,7 +145,7 @@ class PlayUtils():
|
||||||
# Do nothing, path is updated with our verification if applies.
|
# Do nothing, path is updated with our verification if applies.
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
source['Path'] = self.get_http_path(source, self.force_transcode or source['SupportsDirectStream'] == False)
|
source['Path'] = self.get_http_path(source, self.force_transcode)
|
||||||
|
|
||||||
log.debug('get source: %s', source)
|
log.debug('get source: %s', source)
|
||||||
return source
|
return source
|
||||||
|
@ -439,7 +442,7 @@ class PlayUtils():
|
||||||
selection = list(['No subtitles']) + list(subs_streams.keys())
|
selection = list(['No subtitles']) + list(subs_streams.keys())
|
||||||
resp = dialog.select(lang(33014), selection)
|
resp = dialog.select(lang(33014), selection)
|
||||||
if resp:
|
if resp:
|
||||||
index = subs_streams[selection[resp]] if resp > -1 else sources.get('DefaultSubtitleStreamIndex')
|
index = subs_streams[selection[resp]] if resp > -1 else source.get('DefaultSubtitleStreamIndex')
|
||||||
if index is not None:
|
if index is not None:
|
||||||
server_settings = self.emby.get_server_transcoding_settings()
|
server_settings = self.emby.get_server_transcoding_settings()
|
||||||
if server_settings['EnableSubtitleExtraction'] and streams[index]['SupportsExternalStream']:
|
if server_settings['EnableSubtitleExtraction'] and streams[index]['SupportsExternalStream']:
|
||||||
|
|
Loading…
Reference in a new issue