Fixing the chunker
This commit is contained in:
@@ -747,8 +747,13 @@ def build_render_plan(
|
|||||||
# Save narration end time (before outro)
|
# Save narration end time (before outro)
|
||||||
narration_end_time = total_duration
|
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.
|
# 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]
|
missing_outro_ids = [vid_id for vid_id in config.outro if vid_id not in videos]
|
||||||
if missing_outro_ids:
|
if missing_outro_ids:
|
||||||
found = resolve_missing_videos(missing_outro_ids, project_path, config)
|
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)
|
# Build outro events (plays after narration ends)
|
||||||
outro_events = _extract_outro_events(
|
outro_events = _extract_outro_events(
|
||||||
config.outro,
|
config.outro if is_last_chunk else [],
|
||||||
videos,
|
videos,
|
||||||
config.cutouts,
|
config.cutouts,
|
||||||
total_duration,
|
total_duration,
|
||||||
|
|||||||
Reference in New Issue
Block a user