From 4a24d3987f3bb8390bfa47480359b094b4b898e5 Mon Sep 17 00:00:00 2001 From: jenstandstad Date: Tue, 12 May 2026 20:16:28 +0200 Subject: [PATCH] Fixing the chunker --- gnommo/transformer.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/gnommo/transformer.py b/gnommo/transformer.py index 4634621..d276062 100644 --- a/gnommo/transformer.py +++ b/gnommo/transformer.py @@ -747,8 +747,13 @@ def build_render_plan( # Save narration end time (before outro) narration_end_time = total_duration + # Include outro only when rendering to the end of the video. + # A slide_range with an explicit end slide (e.g. S1:S10) is a middle chunk — + # skip the outro so it doesn't appear on every chunk, only the last one. + is_last_chunk = not slide_range or slide_range[1] is None + # Resolve any outro videos missing from videos.json via shared_assets. - if config.outro: + if config.outro and is_last_chunk: missing_outro_ids = [vid_id for vid_id in config.outro if vid_id not in videos] if missing_outro_ids: found = resolve_missing_videos(missing_outro_ids, project_path, config) @@ -759,7 +764,7 @@ def build_render_plan( # Build outro events (plays after narration ends) outro_events = _extract_outro_events( - config.outro, + config.outro if is_last_chunk else [], videos, config.cutouts, total_duration,