fix 0 pixel gate, fallback cursur halutination, comment halutination

This commit is contained in:
jaehwang committed 2026-09-09 15:43:52 +09:00
1 parent a2543e19d4
commit 364616ec0f
9 files changed
+286 -82

No files matched your search

+14 -1
View File
@@ -31,6 +31,16 @@ def load_sections(sections_dir: Path) -> list[DetailSection]:
for item in json.loads(index_path.read_text(encoding="utf-8"))]
def load_details(product_dir: Path) -> dict[str, Image.Image]:
"""상세페이지 롱이미지. 스크롤은 조각이 아니라 이 위에서 일어난다."""
details = {}
for path in sorted((product_dir / "details").glob("detail_*.*")):
details[path.stem] = Image.open(path)
if not details:
raise SystemExit(f"{product_dir / 'details'} 비었음 — test_fetch_nol 을 먼저 돌릴 것")
return details
def band_info(meta: NolMeta) -> EndBandInfo:
period = f"{meta.play_start_date or ''} ~ {meta.play_end_date or ''}".strip(" ~")
detail = " · ".join(part for part in (period.replace("-", "."), meta.place_name) if part)
@@ -66,6 +76,7 @@ def main() -> None:
product_dir / "upscaled.png", clip_path.read_bytes(), timeline,
(product_dir / "narration.mp3").read_bytes(),
load_sections(product_dir / "sections"), band_info(meta),
details=load_details(product_dir),
bgm_mp3=bgm_path.read_bytes() if bgm_path.exists() else None,
qr=Image.open(qr_path) if qr_path.exists() else None)
@@ -75,7 +86,9 @@ def main() -> None:
for scene in result.plan.scenes:
label = f"{scene.section} [{scene.tag}]" if scene.section else ""
print(f" 큐{scene.cue} {scene.kind:7} {label}")
span = (f" {scene.source} {scene.y0:.3f}→{scene.y1:.3f}"
if scene.kind == "scroll" else "")
print(f" 큐{scene.cue} {scene.kind:7} {label}{span}")
if not qr_path.exists():
print(f"※ {qr_path.name} 없음 — 엔드밴드에 QR을 안 넣는다")
print(f"\n{result.frames}프레임 · {result.duration:.2f}초 · {len(result.video) / 1e6:.1f}MB")