From 15ddca2e5f5d1e6d2818c2115b89ea651bacdc49 Mon Sep 17 00:00:00 2001 From: hoelee Date: Sun, 1 Nov 2026 14:31:16 +0800 Subject: [PATCH] =?UTF-8?q?fix(install):=20`--dest`=20=E6=98=AF=E7=9B=AE?= =?UTF-8?q?=E5=BD=95=E6=97=B6=E5=9C=A8=E7=BC=96=E7=A0=81=E5=89=8D=E5=B0=B1?= =?UTF-8?q?=E6=8B=92=E7=BB=9D=EF=BC=88=E5=88=AB=E5=86=8D=E7=99=BD=E8=8A=B1?= =?UTF-8?q?=E4=B8=80=E6=AC=A1=E7=BC=96=E7=A0=81=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 安装段现在也会拒,但那是在编码之后 —— 实测 92 s 的短片白跑一遍,一集正片就是一个小时。 把这条判断提到 process() 的入口(probe 之前):0.2 s 返回 `FAIL install target is a directory: … (`--dest` wants a file path)`,源与目录都不动。 --- scripts/library_run.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/library_run.py b/scripts/library_run.py index c07bbe5..7a2a219 100644 --- a/scripts/library_run.py +++ b/scripts/library_run.py @@ -1692,6 +1692,11 @@ def already_hevc(src, info, container="mp4"): def process(src, args, dest=None, origin=None): container = (getattr(args, "container", None) or "mp4").lower() + # `--dest` takes a FILE path. Refuse a directory HERE, before the encode: the install stage + # notices on its own, but only after a full encode has been paid for (measured 2026-11-01: one + # wasted 90 s on a clip, an hour on a real episode). + if dest and os.path.isdir(dest): + return ("FAIL install target is a directory: %s (`--dest` wants a file path)" % dest), None info = probe(src) if not info: return "FAIL unreadable", None