Skip to content

pref: yt_dlp_extra_args#86

Open
alexanderadam wants to merge 4 commits into
philippe44:masterfrom
alexanderadam:feat/yt_dlp_cookies_pref
Open

pref: yt_dlp_extra_args#86
alexanderadam wants to merge 4 commits into
philippe44:masterfrom
alexanderadam:feat/yt_dlp_cookies_pref

Conversation

@alexanderadam

Copy link
Copy Markdown
Contributor

text field on the settings page so --js-runtimes node:/usr/bin/node
or any other yt-dlp flag can be passed without code changes

text field on the settings page so --js-runtimes node:/usr/bin/node
or any other yt-dlp flag can be passed without code changes. yt-dlp
since late 2025 needs a JS runtime for some signed urls and the
runtime path varies by container/host.
instead of just logging yt-dlp failed and silently skipping. parse
stderr for Video unavailable / Private video / age restricted, log
a warn line with the video id and title from the meta cache, push
a short message to the player display. unknown failures still log
as error.

also pipe yt_dlp_extra_args through to the command so --js-runtimes
node:/usr/bin/node or anything else can be set from prefs without
touching code.
--js-runtimes alone leaves the default deno preference in place. when
deno is not installed yt-dlp falls back to no runtime and still prints
"No supported JavaScript runtime". --no-js-runtimes clears the list
first, then --js-runtimes node adds it. without that the pref looks
set but does nothing.
YouTube has been rolling out 'Sign in to confirm youre not a bot'
for server IPs that get a bit too active. yt-dlp can authenticate
through --cookies <file> but that needs a file the plugin can
point at and that file has to come from somewhere.

new pref yt_dlp_cookies, rendered as a textarea in the settings
page. user pastes the netscape format cookies.txt from a browser
where theyre logged in to youtube. plugin materialises the content
to <cachedir>/youtube-cookies.txt (mode 0600) and prepends
--cookies <path> to every yt-dlp call.

file is only rewritten when the pref content actually changed so
we dont touch the disk on every track. empty pref means no
--cookies arg, same as before.

related: PLUGIN_YOUTUBE_YTDLP_COOKIES + _DESC strings in EN and DE.
the description warns that the content is password equivalent.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant