diff --git a/server/app.py b/server/app.py index f75020b..66f68c1 100644 --- a/server/app.py +++ b/server/app.py @@ -753,9 +753,17 @@ async def auto_prepare_stream(pid: str) -> StreamingResponse: hid = h["id"] state = None failed = False + # ⚠ paste_analyze 내부에서 draft_name = _safe_name(title) or draft_name 로 + # 영상 제목이 항상 draft_name 을 덮어쓴다(_safe_name 은 거의 항상 truthy) — + # 여기서 넘기는 f"auto_{aid}_{hid}" 는 그래서 절대 안 쓰인다. 같은 URL(한 aid)의 + # 하이라이트 5개는 제목이 똑같으니 name_suffix 없이는 draft_name 이 전부 같아져 + # build_bg_template_draft 의 allow_replace=True 가 뒤엣것으로 앞을 덮어쓴다 + # (옛 /auto/build 의 tag→name_suffix 메커니즘 — 여기서도 반드시 넘겨야 한다). + safe_tag = "".join(ch for ch in f"하이라이트{hid}" if ch.isalnum() or ch in "-_")[:20] try: async for ev in paste_analyze(h["paste"], f"auto_{aid}_{hid}", - remove_silence=True, asr_bottom=True): + remove_silence=True, asr_bottom=True, + name_suffix=safe_tag): if ev.get("type") == "state": # 내부 전용 — 밖으로 흘리지 않는다 state = ev["state"] continue