mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-02-28 18:22:42 -08:00
fix(plugin): add auto-start option compatibility aliases
This commit is contained in:
@@ -18,10 +18,21 @@ function M.create(ctx)
|
|||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local function resolve_auto_start_enabled()
|
||||||
|
local raw_auto_start = opts.auto_start
|
||||||
|
if raw_auto_start == nil then
|
||||||
|
raw_auto_start = opts.auto_start_overlay
|
||||||
|
end
|
||||||
|
if raw_auto_start == nil then
|
||||||
|
raw_auto_start = opts["auto-start"]
|
||||||
|
end
|
||||||
|
return options_helper.coerce_bool(raw_auto_start, false)
|
||||||
|
end
|
||||||
|
|
||||||
local function on_file_loaded()
|
local function on_file_loaded()
|
||||||
aniskip.clear_aniskip_state()
|
aniskip.clear_aniskip_state()
|
||||||
|
|
||||||
local should_auto_start = options_helper.coerce_bool(opts.auto_start, false)
|
local should_auto_start = resolve_auto_start_enabled()
|
||||||
if should_auto_start then
|
if should_auto_start then
|
||||||
process.start_overlay()
|
process.start_overlay()
|
||||||
-- Give the overlay process a moment to initialize before querying AniSkip.
|
-- Give the overlay process a moment to initialize before querying AniSkip.
|
||||||
|
|||||||
@@ -100,7 +100,11 @@ function M.create(ctx)
|
|||||||
end
|
end
|
||||||
|
|
||||||
local function resolve_visible_overlay_startup()
|
local function resolve_visible_overlay_startup()
|
||||||
return options_helper.coerce_bool(opts.auto_start_visible_overlay, false)
|
local raw_visible_overlay = opts.auto_start_visible_overlay
|
||||||
|
if raw_visible_overlay == nil then
|
||||||
|
raw_visible_overlay = opts["auto-start-visible-overlay"]
|
||||||
|
end
|
||||||
|
return options_helper.coerce_bool(raw_visible_overlay, false)
|
||||||
end
|
end
|
||||||
|
|
||||||
local function apply_startup_overlay_preferences()
|
local function apply_startup_overlay_preferences()
|
||||||
|
|||||||
Reference in New Issue
Block a user