diff --git a/changes/2026-03-23-youtube-cookie-override.md b/changes/2026-03-23-youtube-cookie-override.md new file mode 100644 index 0000000..f6cf384 --- /dev/null +++ b/changes/2026-03-23-youtube-cookie-override.md @@ -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 SubMiner’s internal YouTube defaults, preserving explicit runtime overrides for `--ytdl-raw-options-*`. diff --git a/launcher/mpv.ts b/launcher/mpv.ts index 406759f..161af4a 100644 --- a/launcher/mpv.ts +++ b/launcher/mpv.ts @@ -557,13 +557,9 @@ export async function startMpv( const mpvArgs: string[] = []; if (args.profile) mpvArgs.push(`--profile=${args.profile}`); mpvArgs.push(...DEFAULT_MPV_SUBMINER_ARGS); - if (args.mpvArgs) { - mpvArgs.push(...parseMpvArgString(args.mpvArgs)); - } - if (targetKind === 'url' && isYoutubeTarget(target)) { log('info', args.logLevel, 'Applying URL playback options'); - mpvArgs.push('--ytdl=yes', '--ytdl-raw-options='); + mpvArgs.push('--ytdl=yes'); if (isYoutubeTarget(target)) { const subtitleLangs = uniqueNormalizedLangCodes([ @@ -588,6 +584,9 @@ export async function startMpv( } } } + if (args.mpvArgs) { + mpvArgs.push(...parseMpvArgString(args.mpvArgs)); + } if (preloadedSubtitles?.primaryPath) { mpvArgs.push(`--sub-file=${preloadedSubtitles.primaryPath}`);