feat: new cf and th allow to access user configuration and theme scheme in sync/async plugins consistently (#2389)

This commit is contained in:
三咲雅 · Misaki Masa 2025-02-23 20:37:35 +08:00 committed by GitHub
parent 2410bb9671
commit 7b4c4eae40
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
30 changed files with 158 additions and 120 deletions

View file

@ -11,7 +11,7 @@ function M:peek(job)
return
end
ya.sleep(math.max(0, PREVIEW.image_delay / 1000 + start - os.clock()))
ya.sleep(math.max(0, cf.preview.image_delay / 1000 + start - os.clock()))
ya.image_show(cache, job.area)
ya.preview_widgets(job, {})
end
@ -31,9 +31,9 @@ function M:preload(job)
tostring(job.file.url),
"-flatten",
"-resize",
string.format("%dx%d^", PREVIEW.max_width, PREVIEW.max_height),
string.format("%dx%d^", cf.preview.max_width, cf.preview.max_height),
"-quality",
PREVIEW.image_quality,
cf.preview.image_quality,
"-auto-orient",
"JPG:" .. tostring(cache),
})