DubSegment
Class methods
Persist transcript segments and (optionally) translations for one dub job. Safe to call multiple times — uses ON CONFLICT DO NOTHING everywhere.
for_episode(episode_id : Int64, text_lang : String | Nil, audio_lang : String | Nil) : Array(DubSegmentCue)
Fetch cues for an episode.
text_lang — which language's translation to include in each cue (nil/empty = include no translation, show original text only) audio_lang — which language's synth timestamps to use for timing (nil/empty = use original timestamps, for original audio playback)
Separating these allows e.g. playing original audio while showing a translation, or playing Russian dubbed audio while showing English subs.