Simpliy a little bit

This commit is contained in:
三咲雅 misaki masa 2026-07-19 23:54:03 +08:00 committed by GitHub
parent 7afc3effa3
commit 4a226189ab
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -25,13 +25,11 @@ function M:preload(job)
return true
end
local cmd = M.with_limit()
cmd:arg { "-define", "filename:literal=true" }
local path = tostring(job.file.path)
local cmd = M.with_limit():arg({ "-define", "filename:literal=true" })
if job.args.flatten then
cmd:arg { path, "-flatten" }
cmd:arg { tostring(job.file.path), "-flatten" }
else
cmd:arg { "-define", "image:frames=0", path }
cmd:arg { "-define", "image:frames=0", tostring(job.file.path) }
end
cmd:arg { "-auto-orient", "-strip" }