fix(install): --dest 是目录时在编码前就拒绝(别再白花一次编码)
安装段现在也会拒,但那是在编码之后 —— 实测 92 s 的短片白跑一遍,一集正片就是一个小时。 把这条判断提到 process() 的入口(probe 之前):0.2 s 返回 `FAIL install target is a directory: … (`--dest` wants a file path)`,源与目录都不动。
This commit is contained in:
1 parent
4b5cbe0ab6
commit
15ddca2e5f
1 file changed
+5
@@ -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
|
||||
|
||||
Reference in new issue
Block a user