fix(launcher): preserve user YouTube ytdl raw options

This commit is contained in:
2026-03-23 00:34:39 -07:00
parent ba9bae63e4
commit 1f48ff000c
2 changed files with 9 additions and 5 deletions

View File

@@ -0,0 +1,5 @@
type: changed
area: launcher
- Stopped forcing `--ytdl-raw-options=` before user-provided MPV options during YouTube playback so existing YouTube cookie integrations in user configs are no longer clobbered.
- Reordered launcher argument application so user `--args` are appended after SubMiners internal YouTube defaults, preserving explicit runtime overrides for `--ytdl-raw-options-*`.

View File

@@ -557,13 +557,9 @@ export async function startMpv(
const mpvArgs: string[] = []; const mpvArgs: string[] = [];
if (args.profile) mpvArgs.push(`--profile=${args.profile}`); if (args.profile) mpvArgs.push(`--profile=${args.profile}`);
mpvArgs.push(...DEFAULT_MPV_SUBMINER_ARGS); mpvArgs.push(...DEFAULT_MPV_SUBMINER_ARGS);
if (args.mpvArgs) {
mpvArgs.push(...parseMpvArgString(args.mpvArgs));
}
if (targetKind === 'url' && isYoutubeTarget(target)) { if (targetKind === 'url' && isYoutubeTarget(target)) {
log('info', args.logLevel, 'Applying URL playback options'); log('info', args.logLevel, 'Applying URL playback options');
mpvArgs.push('--ytdl=yes', '--ytdl-raw-options='); mpvArgs.push('--ytdl=yes');
if (isYoutubeTarget(target)) { if (isYoutubeTarget(target)) {
const subtitleLangs = uniqueNormalizedLangCodes([ const subtitleLangs = uniqueNormalizedLangCodes([
@@ -588,6 +584,9 @@ export async function startMpv(
} }
} }
} }
if (args.mpvArgs) {
mpvArgs.push(...parseMpvArgString(args.mpvArgs));
}
if (preloadedSubtitles?.primaryPath) { if (preloadedSubtitles?.primaryPath) {
mpvArgs.push(`--sub-file=${preloadedSubtitles.primaryPath}`); mpvArgs.push(`--sub-file=${preloadedSubtitles.primaryPath}`);