mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-05-13 08:12:54 -07:00
feat: inject bundled mpv plugin for managed launches, remove legacy glob (#62)
* feat: inject bundled mpv plugin for managed launches, remove legacy glob - SubMiner-managed launcher and Windows shortcut launches inject the bundled plugin when no global plugin is detected - First-run setup detects and removes legacy global plugin files via OS trash before managed playback starts - Makefile `install-plugin` target and Windows config-rewrite script removed; Linux/macOS install now copies plugin to app data dir - AniList stats search and post-watch tracking now go through the shared rate limiter - Stats cover-art lookup reuses cached AniList data before issuing a new request - Closing mpv in a launcher-managed session now terminates the background Electron app * harden bootstrap version load and clean plugin on uninstall - Use pcall for version.lua in bootstrap.lua so missing version module does not crash plugin startup - Remove plugin/subminer from app-data dirs in uninstall-linux and uninstall-macos targets - Add Lua compat test asserting bootstrap uses defensive pcall for version load - Add release-workflow test asserting uninstall targets clean bundled plugin dirs - Delete completed planning document
This commit is contained in:
@@ -14,6 +14,10 @@ function M.init()
|
||||
local utils = require("mp.utils")
|
||||
|
||||
local options_helper = require("options")
|
||||
local ok_version, version = pcall(require, "version")
|
||||
if not ok_version or type(version) ~= "table" then
|
||||
version = { version = "unknown" }
|
||||
end
|
||||
local environment = require("environment").create({ mp = mp, utils = utils })
|
||||
local opts = options_helper.load(options_lib, environment.default_socket_path())
|
||||
local state = require("state").new()
|
||||
@@ -78,7 +82,7 @@ function M.init()
|
||||
ctx.session_bindings.register_bindings()
|
||||
ctx.messages.register_script_messages()
|
||||
ctx.lifecycle.register_lifecycle_hooks()
|
||||
ctx.log.subminer_log("info", "lifecycle", "SubMiner plugin loaded")
|
||||
ctx.log.subminer_log("info", "lifecycle", "SubMiner plugin loaded " .. tostring(version.version or "unknown"))
|
||||
end
|
||||
|
||||
return M
|
||||
|
||||
Reference in New Issue
Block a user