fix(vtt): strip cue settings from end timestamp in parse_ad_cues

tts_synthesis.parse_ad_cues() was passing "00:00:02.500 line:0%" to
_parse_timestamp() — cue settings were not stripped from the end-time part
of the timing line. Split on whitespace and take first token only.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Vadym Samoilenko 2026-05-13 19:18:02 +01:00
parent f22d568fc5
commit 3b31012901

View file

@ -454,7 +454,8 @@ def parse_ad_cues(vtt_content: str) -> list[dict]:
if " --> " in line:
timing_parts = line.split(" --> ")
start_time = _parse_timestamp(timing_parts[0].strip())
end_time = _parse_timestamp(timing_parts[1].strip())
# Strip cue settings (e.g. "line:0% align:start") from end timestamp
end_time = _parse_timestamp(timing_parts[1].strip().split()[0])
# Get text from next line(s)
i += 1