mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-02-28 06:22:45 -08:00
Fix launcher overlay startup gating and socket alignment
- only start overlay from launcher when --start is passed or plugin auto_start is enabled - read socket_path from mpv script-opts/subminer.conf and use it for mpv/overlay/subtitle IPC - only stop overlay on launcher cleanup when launcher actually started it - preserve --start semantics for second-instance command+action flows so MPV reconnect happens before toggles
This commit is contained in:
@@ -255,7 +255,7 @@ test("handleCliCommandService still runs non-start actions on second-instance",
|
||||
deps,
|
||||
);
|
||||
assert.ok(calls.includes("toggleVisibleOverlay"));
|
||||
assert.equal(calls.some((value) => value === "connectMpvClient"), false);
|
||||
assert.equal(calls.some((value) => value === "connectMpvClient"), true);
|
||||
});
|
||||
|
||||
test("handleCliCommandService handles visibility and utility command dispatches", () => {
|
||||
|
||||
@@ -215,19 +215,18 @@ export function handleCliCommandService(
|
||||
args.openRuntimeOptions ||
|
||||
args.texthooker ||
|
||||
args.help;
|
||||
const ignoreStart = source === "second-instance" && args.start;
|
||||
if (ignoreStart && !hasNonStartAction) {
|
||||
const ignoreStartOnly = source === "second-instance" && args.start && !hasNonStartAction;
|
||||
if (ignoreStartOnly) {
|
||||
deps.log("Ignoring --start because SubMiner is already running.");
|
||||
return;
|
||||
}
|
||||
|
||||
const shouldStart =
|
||||
!ignoreStart &&
|
||||
(args.start ||
|
||||
(source === "initial" &&
|
||||
(args.toggle ||
|
||||
args.toggleVisibleOverlay ||
|
||||
args.toggleInvisibleOverlay)));
|
||||
args.start ||
|
||||
(source === "initial" &&
|
||||
(args.toggle ||
|
||||
args.toggleVisibleOverlay ||
|
||||
args.toggleInvisibleOverlay));
|
||||
const needsOverlayRuntime = commandNeedsOverlayRuntime(args);
|
||||
|
||||
if (args.socketPath !== undefined) {
|
||||
|
||||
Reference in New Issue
Block a user