Stopped transcoding with subtitles off

This commit is contained in:
thomabx 2020-02-28 19:25:42 -08:00
parent dd723f92b0
commit 42912890ad

View File

@ -35,7 +35,8 @@ function VideoContent(video) as object
if video.Subtitles.count() > 0 then
if video.Subtitles[0].IsTextSubtitleStream then
video.content.SubtitleTracks = video.Subtitles[0].track
else
else if getCaptionMode() = "On"
'Only transcode if subtitles are turned on
params.append({"SubtitleStreamIndex" : video.Subtitles[0].index })
end if
end if
@ -101,6 +102,11 @@ function getSubtitles(id as string, MediaStreams)
return tracks
end function
function getCaptionMode() as string
devinfo = CreateObject("roDeviceInfo")
return devinfo.GetCaptionsMode()
end function
'Opens dialog asking user if they want to resume video or start playback over
function startPlayBackOver(time as LongInteger) as boolean
return option_dialog([ "Resume playing at " + ticksToHuman(time) + ".", "Start over from the begining." ])