mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-11-10 04:46:07 -08:00
Fix Windows mpv handoff and tray setup (#82)
This commit is contained in:
1 parent
17d97f0b7e
commit
920cbab1bc
31 files changed
+751
-220
No files matched your search
@@ -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