fix(jellyfin): find mpv when SubMiner is launched from Finder (#298)

This commit is contained in:
sudacode authored and GitHub committed 2026-10-24 18:27:31 -07:00
1 parent 01613f1be5
commit d047e3e0a4
16 files changed
+193 -32

No files matched your search

+10 -3
View File
@@ -392,7 +392,11 @@ import {
getConfiguredWindowsMpvPathStatus,
launchWindowsMpv,
} from './main/runtime/windows-mpv-launch';
import { resolveMpvExecutablePath, spawnMpvProcess } from './main/runtime/mpv-process';
import {
findMpvExecutablePath,
resolveMpvExecutablePath,
spawnMpvProcess,
} from './main/runtime/mpv-process';
import { createWaitForMpvConnectedHandler } from './main/runtime/jellyfin-remote-connection';
import {
DEFAULT_JELLYFIN_CLIENT_NAME,
@@ -2995,8 +2999,11 @@ const mediaTimingReviewRuntime = createMediaTimingReviewRuntime({
getMpvClient: () => appState.mpvClient,
getCurrentMediaPath: () =>
appState.currentMediaPath?.trim() || appState.mpvClient?.currentVideoPath?.trim() || null,
getMpvExecutablePath: () =>
configService.getConfig().mpv.executablePath || process.env.SUBMINER_MPV_PATH?.trim() || '',
// An invalid configured path is passed through so the preview fails instead of using PATH mpv.
getMpvExecutablePath: () => {
const configuredPath = configService.getConfig().mpv.executablePath;
return findMpvExecutablePath(configuredPath) || configuredPath;
},
createPreviewSession: () => new MediaTimingPreviewSession(),
generateWaveform: (options) => generateSpeechWaveform(options),
generateFrame: (options) => mediaTimingFrameExtractor.generate(options),