Use subtitle URL provided by server rather than generating our own
This commit is contained in:
parent
a856a4d5b5
commit
4647f16fe9
|
@ -196,10 +196,12 @@ function sortSubtitles(id as string, MediaStreams)
|
|||
prefered_lang = m.user.Configuration.SubtitleLanguagePreference
|
||||
for each stream in MediaStreams
|
||||
if stream.type = "Subtitle" then
|
||||
'Documentation lists that srt, ttml, and dfxp can be sideloaded but only srt was working in my testing,
|
||||
'forcing srt for all text subtitles
|
||||
url = Substitute("{0}/Videos/{1}/{2}/Subtitles/{3}/0/", get_url(), dashedid, id, stream.index.tostr())
|
||||
url = url + Substitute("Stream.srt?api_key={0}", get_setting("active_user"))
|
||||
|
||||
url = ""
|
||||
if(stream.DeliveryUrl <> invalid) then
|
||||
url = buildURL(stream.DeliveryUrl)
|
||||
end if
|
||||
|
||||
stream = {
|
||||
"Track": { "Language" : stream.language, "Description": stream.displaytitle , "TrackName": url },
|
||||
"IsTextSubtitleStream": stream.IsTextSubtitleStream,
|
||||
|
|
Loading…
Reference in New Issue
Block a user