mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-11-10 04:46:07 -08:00
* fix(plugin): keep loading OSD off on warm playlist advance - Track overlay_content_ready_seen when the app sends subminer-overlay-loading-ready - Skip restarting the "Overlay loading" spinner for an overlay that already reported ready, so it no longer times out into "Overlay did not become ready" (#315) - Reset the flag on stop, restart, start failure and shutdown - Add start-gate tests for warm and not-yet-ready playlist advances * fix(plugin): only report overlay ready once content has loaded Hide paths dismissed the loading OSD with subminer-overlay-loading-ready, which the plugin now remembers to skip the spinner on later playlist files. A hide before the overlay had content would wrongly mark it ready. The app now sends ready only when the overlay window content is ready, and a new stop-only subminer-overlay-loading-dismissed message otherwise. * fix(plugin): resync overlay readiness on dismissal and mpv connect A dismissal now clears the plugin's readiness flag, since the app sends it only while its overlay window has no content (e.g. a replaced window). On mpv (re)connect the app resends subminer-overlay-loading-ready when the overlay already has content, so a ready signal lost while mpv was away, or sent before this mpv's plugin existed, still reaches the plugin. * refactor(main): pass overlay readiness handler directly
46 lines
1.5 KiB
Lua
46 lines
1.5 KiB
Lua
local M = {}
|
|
|
|
function M.new()
|
|
return {
|
|
overlay_running = false,
|
|
texthooker_running = false,
|
|
overlay_process = nil,
|
|
binary_available = false,
|
|
binary_path = nil,
|
|
detected_backend = nil,
|
|
auto_play_ready_gate_armed = false,
|
|
auto_play_ready_should_resume_playback = false,
|
|
auto_play_ready_timeout = nil,
|
|
auto_play_ready_osd_timer = nil,
|
|
auto_play_ready_signal_seen = false,
|
|
auto_play_ready_initial_pause_ownership_consumed = false,
|
|
-- The running overlay has reported its content ready at least once; warm playlist advances
|
|
-- reuse that window, so they must not restart the loading spinner (#315).
|
|
overlay_content_ready_seen = false,
|
|
overlay_loading_osd_active = false,
|
|
overlay_loading_osd_timer = nil,
|
|
overlay_loading_osd_deadline = nil,
|
|
overlay_loading_osd_frame = 1,
|
|
pending_visible_overlay_hide_timer = nil,
|
|
pending_visible_overlay_hide_generation = 0,
|
|
suppress_ready_overlay_restore = false,
|
|
force_ready_overlay_restore = false,
|
|
visible_overlay_requested = nil,
|
|
last_visible_overlay_toggle_time = nil,
|
|
current_media_identity = nil,
|
|
current_media_title = nil,
|
|
pending_reload_media_identity = nil,
|
|
pending_reload_media_title = nil,
|
|
pending_reload_reason = nil,
|
|
app_managed_playback_pending = false,
|
|
app_managed_playback_active = false,
|
|
auto_start_retry_generation = 0,
|
|
session_binding_generation = 0,
|
|
session_binding_names = {},
|
|
session_numeric_binding_names = {},
|
|
session_numeric_selection = nil,
|
|
}
|
|
end
|
|
|
|
return M
|