mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-03-01 18:22:41 -08:00
feat(core): add Electron runtime, services, and app composition
This commit is contained in:
24
src/main/runtime/mpv-jellyfin-defaults-main-deps.ts
Normal file
24
src/main/runtime/mpv-jellyfin-defaults-main-deps.ts
Normal file
@@ -0,0 +1,24 @@
|
||||
import type {
|
||||
createApplyJellyfinMpvDefaultsHandler,
|
||||
createGetDefaultSocketPathHandler,
|
||||
} from './mpv-jellyfin-defaults';
|
||||
|
||||
type ApplyJellyfinMpvDefaultsMainDeps = Parameters<typeof createApplyJellyfinMpvDefaultsHandler>[0];
|
||||
type GetDefaultSocketPathMainDeps = Parameters<typeof createGetDefaultSocketPathHandler>[0];
|
||||
|
||||
export function createBuildApplyJellyfinMpvDefaultsMainDepsHandler(
|
||||
deps: ApplyJellyfinMpvDefaultsMainDeps,
|
||||
) {
|
||||
return (): ApplyJellyfinMpvDefaultsMainDeps => ({
|
||||
sendMpvCommandRuntime: (client, command) => deps.sendMpvCommandRuntime(client, command),
|
||||
jellyfinLangPref: deps.jellyfinLangPref,
|
||||
});
|
||||
}
|
||||
|
||||
export function createBuildGetDefaultSocketPathMainDepsHandler(
|
||||
deps: GetDefaultSocketPathMainDeps,
|
||||
) {
|
||||
return (): GetDefaultSocketPathMainDeps => ({
|
||||
platform: deps.platform,
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user