feat(core): add Electron runtime, services, and app composition

This commit is contained in:
2026-02-22 21:43:43 -08:00
parent 448ce03fd4
commit d3fd47f0ec
562 changed files with 69719 additions and 0 deletions
@@ -0,0 +1,36 @@
import type {
createStartJellyfinRemoteSessionHandler,
createStopJellyfinRemoteSessionHandler,
} from './jellyfin-remote-session-lifecycle';
type StartJellyfinRemoteSessionMainDeps = Parameters<typeof createStartJellyfinRemoteSessionHandler>[0];
type StopJellyfinRemoteSessionMainDeps = Parameters<typeof createStopJellyfinRemoteSessionHandler>[0];
export function createBuildStartJellyfinRemoteSessionMainDepsHandler(
deps: StartJellyfinRemoteSessionMainDeps,
) {
return (): StartJellyfinRemoteSessionMainDeps => ({
getJellyfinConfig: () => deps.getJellyfinConfig(),
getCurrentSession: () => deps.getCurrentSession(),
setCurrentSession: (session) => deps.setCurrentSession(session),
createRemoteSessionService: (options) => deps.createRemoteSessionService(options),
defaultDeviceId: deps.defaultDeviceId,
defaultClientName: deps.defaultClientName,
defaultClientVersion: deps.defaultClientVersion,
handlePlay: (payload) => deps.handlePlay(payload),
handlePlaystate: (payload) => deps.handlePlaystate(payload),
handleGeneralCommand: (payload) => deps.handleGeneralCommand(payload),
logInfo: (message: string) => deps.logInfo(message),
logWarn: (message: string, details?: unknown) => deps.logWarn(message, details),
});
}
export function createBuildStopJellyfinRemoteSessionMainDepsHandler(
deps: StopJellyfinRemoteSessionMainDeps,
) {
return (): StopJellyfinRemoteSessionMainDeps => ({
getCurrentSession: () => deps.getCurrentSession(),
setCurrentSession: (session) => deps.setCurrentSession(session),
clearActivePlayback: () => deps.clearActivePlayback(),
});
}