Extend final shot to chunk boundary
tests / test (push) Canceled after 0s
tests / windows-storage (push) Canceled after 0s

This commit is contained in:
2026-10-15 08:36:32 +00:00
parent 70ba74bc78
commit 3f006030c6
4 changed files with 16 additions and 0 deletions
+4
View File
@@ -84,6 +84,10 @@ def normalize_sequence(value: Any, *, clip_count: int, default_seconds: float) -
if text:
slots.append({"start": start, "end": end, "text": text})
slots.sort(key=lambda slot: (slot["start"], slot["end"]))
if slots:
# The final shot owns the end of every uniform-duration chunk;
# there must be no unassigned tail on the editor track.
slots[-1]["end"] = duration
clips.append({"duration": duration, "slots": slots})
return {"version": 1, "clips": clips}