Adding a fix
This commit is contained in:
+18
-13
@@ -9,9 +9,12 @@ Design:
|
||||
- commit appends a timestamped entry to commits.log
|
||||
- up checks server commits.log for newer entry (aborts if found),
|
||||
then rsyncs a manifest of only the *inputs* needed to render
|
||||
(manuscript, slides, narration, audio, videos, keynote). It does
|
||||
NOT push the rendered output (out/*.mp4/.srt) — that is produced
|
||||
on the rig, so pushing a stale local copy would clobber it.
|
||||
(manuscript, slides, narration, audio, videos, keynote). For
|
||||
narration it pushes the raw raw_mov/ recordings, NOT the processed
|
||||
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
|
||||
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)))
|
||||
|
||||
# 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_json = project_path / narration_rel
|
||||
narration_dir = narration_json.parent
|
||||
if narration_json.exists():
|
||||
files.add(narration_rel)
|
||||
try:
|
||||
data = json.loads(narration_json.read_text(encoding="utf-8"))
|
||||
for entry in data.values():
|
||||
src = entry.get("source_file")
|
||||
if src:
|
||||
candidate = narration_dir / src
|
||||
if candidate.exists():
|
||||
files.add(str(candidate.relative_to(project_path)))
|
||||
except (json.JSONDecodeError, OSError):
|
||||
pass
|
||||
raw_mov_dir = narration_dir / "raw_mov"
|
||||
if raw_mov_dir.is_dir():
|
||||
for f in sorted(raw_mov_dir.glob("*.mov")):
|
||||
if f.is_file() and not f.name.startswith("."):
|
||||
files.add(str(f.relative_to(project_path)))
|
||||
|
||||
# Audio — standard location, non-shared entries only
|
||||
audio_json = project_path / "media" / "audio" / "audio.json"
|
||||
|
||||
Reference in New Issue
Block a user