From 71d0f2fc4e3a5bb21e72cc7b6ba33dd38cdb9ed1 Mon Sep 17 00:00:00 2001 From: "hehihoho3@gmail.com" Date: Wed, 5 Aug 2026 12:46:56 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20/auto/prepare=EA=B0=80=20paste=5Fanalyze?= =?UTF-8?q?=EC=97=90=20name=5Fsuffix=EB=A5=BC=20=EC=95=88=20=EB=84=98?= =?UTF-8?q?=EA=B2=A8=20=EB=93=9C=EB=9E=98=ED=94=84=ED=8A=B8=EA=B0=80=20?= =?UTF-8?q?=EB=8D=AE=EC=96=B4=EC=8D=A8=EC=A7=80=EB=8D=98=20=EB=AC=B8?= =?UTF-8?q?=EC=A0=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit pipeline.py의 draft_name = _safe_name(title) or draft_name는 영상 제목이 항상 draft_name 인자를 무력화해 name_suffix만이 유일한 구분 수단인데, /auto/prepare의 paste_analyze 호출에 그게 빠져 있었다. 결과: 한 URL의 하이라이트 5개가 전부 같은 draft_name을 가져 "전부 만들기" 시 뒤에 만든 것이 앞의 CapCut 드래프트를 조용히 덮어썼다(진행판은 5개 다 완료로 표시). 옛 /auto/build의 tag→name_suffix 방식을 그대로 복원해 ID별 고유 접미사를 넘기게 고쳤다. Co-Authored-By: Claude Opus 5 (1M context) --- server/app.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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