mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-06-20 03:13:31 -07:00
Fix Windows mpv handoff and tray setup (#82)
This commit is contained in:
@@ -12,6 +12,7 @@ type CliCommandContextMainState = {
|
||||
export function createBuildCliCommandContextMainDepsHandler(deps: {
|
||||
appState: CliCommandContextMainState;
|
||||
setLogLevel?: (level: NonNullable<CliArgs['logLevel']>) => void;
|
||||
onMpvSocketPathChanged?: (nextSocketPath: string, previousSocketPath: string) => void;
|
||||
texthookerService: CliCommandContextFactoryDeps['texthookerService'];
|
||||
getResolvedConfig: () => {
|
||||
texthooker?: { openBrowser?: boolean };
|
||||
@@ -74,7 +75,11 @@ export function createBuildCliCommandContextMainDepsHandler(deps: {
|
||||
setLogLevel: deps.setLogLevel,
|
||||
getSocketPath: () => deps.appState.mpvSocketPath,
|
||||
setSocketPath: (socketPath: string) => {
|
||||
const previousSocketPath = deps.appState.mpvSocketPath;
|
||||
deps.appState.mpvSocketPath = socketPath;
|
||||
if (socketPath !== previousSocketPath) {
|
||||
deps.onMpvSocketPathChanged?.(socketPath, previousSocketPath);
|
||||
}
|
||||
},
|
||||
getMpvClient: () => deps.appState.mpvClient,
|
||||
showOsd: (text: string) => deps.showMpvOsd(text),
|
||||
|
||||
Reference in New Issue
Block a user