From 05f5f67958da41f0d0cefe17f711ab65aab2afa5 Mon Sep 17 00:00:00 2001 From: JianMiau Date: Tue, 2 Jun 2026 21:03:36 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3:=20=E5=96=AE=E6=94=AF?= =?UTF-8?q?=E5=BD=B1=E7=89=87=E4=B9=9F=E8=BC=B8=E5=87=BA=E5=88=B0=20no=5Fr?= =?UTF-8?q?edlight=20=E5=AD=90=E8=B3=87=E6=96=99=E5=A4=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 啟動.bat 只勾選一支影片時走單檔模式,原本會把成品/CSV 放到影片同層, 與多支/整資料夾(輸出到 no_redlight)不一致。改為單檔(未指定 -o)時 同樣輸出到來源同層的 no_redlight,行為統一。 本次修正由 Claude Opus 4.8 (1M context) 協助處理。 Co-Authored-By: Claude Opus 4.8 (1M context) --- auto_remove_redlight.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/auto_remove_redlight.py b/auto_remove_redlight.py index fce8e50..1a44e31 100644 --- a/auto_remove_redlight.py +++ b/auto_remove_redlight.py @@ -1170,10 +1170,16 @@ def main(): else: videos = [in_path] if args.output and os.path.splitext(args.output)[1]: + # -o 指定了含副檔名的完整輸出檔名 → 照用 single_named_output = args.output out_dir = os.path.dirname(os.path.abspath(args.output)) or "." + elif args.output: + # -o 指定了資料夾 + out_dir = args.output else: - out_dir = args.output if args.output else os.path.dirname(os.path.abspath(in_path)) + # 預設: 與多支/整資料夾一致,放到來源同層的 no_redlight\ 子資料夾 + out_dir = os.path.join(os.path.dirname(os.path.abspath(in_path)), + OUTPUT_SUBDIR) # --- preview 模式: 確認 ROI 後就結束(僅單一輸入支援)--- if args.preview: