Adding a fix

This commit is contained in:
2026-07-19 21:06:52 +02:00
parent 99ddc2e425
commit cc566208c5
+18 -13
View File
@@ -9,9 +9,12 @@ Design:
- commit appends a timestamped entry to commits.log - commit appends a timestamped entry to commits.log
- up checks server commits.log for newer entry (aborts if found), - up checks server commits.log for newer entry (aborts if found),
then rsyncs a manifest of only the *inputs* needed to render then rsyncs a manifest of only the *inputs* needed to render
(manuscript, slides, narration, audio, videos, keynote). It does (manuscript, slides, narration, audio, videos, keynote). For
NOT push the rendered output (out/*.mp4/.srt) — that is produced narration it pushes the raw raw_mov/ recordings, NOT the processed
on the rig, so pushing a stale local copy would clobber it. segments — the rig runs preprocess to produce the large
processed/*_processed.mov files itself. It also does NOT push the
rendered output (out/*.mp4/.srt) — that is produced on the rig, so
pushing a stale local copy would clobber it.
- down rsyncs everything the server has back to local, including the - down rsyncs everything the server has back to local, including the
freshly rendered out/*.mp4. Rendered output flows one way: rig → local. freshly rendered out/*.mp4. Rendered output flows one way: rig → local.
""" """
@@ -92,21 +95,23 @@ def _build_manifest(project_path: Path) -> list[str]:
files.add(str(f.relative_to(project_path))) files.add(str(f.relative_to(project_path)))
# Narration # Narration
# Push narration.json (preserves per-segment trim/channel settings) plus the
# RAW recordings in raw_mov/. Preprocessing runs on the rig — it produces the
# large processed/*_processed.mov segments there. We deliberately do NOT push
# each entry's source_file: after a local preprocess that points at
# processed/..._processed.mov, and uploading those would both waste bandwidth
# on files the rig regenerates and let a stale local render input clobber the
# rig's freshly produced one.
narration_rel = project.get("narration", "media/narration/narration.json") narration_rel = project.get("narration", "media/narration/narration.json")
narration_json = project_path / narration_rel narration_json = project_path / narration_rel
narration_dir = narration_json.parent narration_dir = narration_json.parent
if narration_json.exists(): if narration_json.exists():
files.add(narration_rel) files.add(narration_rel)
try: raw_mov_dir = narration_dir / "raw_mov"
data = json.loads(narration_json.read_text(encoding="utf-8")) if raw_mov_dir.is_dir():
for entry in data.values(): for f in sorted(raw_mov_dir.glob("*.mov")):
src = entry.get("source_file") if f.is_file() and not f.name.startswith("."):
if src: files.add(str(f.relative_to(project_path)))
candidate = narration_dir / src
if candidate.exists():
files.add(str(candidate.relative_to(project_path)))
except (json.JSONDecodeError, OSError):
pass
# Audio — standard location, non-shared entries only # Audio — standard location, non-shared entries only
audio_json = project_path / "media" / "audio" / "audio.json" audio_json = project_path / "media" / "audio" / "audio.json"