refactor(plugin): split mpv plugin into modules and trim startup overhead

This commit is contained in:
2026-02-27 21:22:44 -08:00
parent c5d4a67f39
commit 1c70e486fe
20 changed files with 1154 additions and 1886 deletions

33
plugin/subminer/state.lua Normal file
View File

@@ -0,0 +1,33 @@
local M = {}
function M.new()
return {
overlay_running = false,
texthooker_running = false,
overlay_process = nil,
binary_available = false,
binary_path = nil,
detected_backend = nil,
hover_highlight = {
revision = -1,
payload = nil,
saved_sub_visibility = nil,
saved_secondary_sub_visibility = nil,
overlay_active = false,
cached_ass = nil,
clear_timer = nil,
last_hover_update_ts = 0,
},
aniskip = {
mal_id = nil,
title = nil,
episode = nil,
intro_start = nil,
intro_end = nil,
found = false,
prompt_shown = false,
},
}
end
return M