Skip to content

Impersonation becomes an option, not a mandate - #469

Merged
Linuxuser67 merged 8 commits into
mainfrom
feature/impersonate-choice
Oct 19, 2026
Merged

Linuxuser67 merged 8 commits into
mainfrom
feature/impersonate-choice

Conversation

@Linuxuser67

Copy link
Copy Markdown
Owner

yt-dlp documents --impersonate as opt-in and warns that forcing it on every request may hurt speed and stability. The hard-coded --impersonate chrome (added when TLS issues surfaced, ahead of any preference surface) becomes a proper choice under Preferences → Advanced → General:

  • None (default) → omit the flag = yt-dlp's documented default; every spawn passes --ignore-config, so nothing else re-enables it
  • Chrome / Edge / Safari → --impersonate <target> (the curl_cffi client families per the yt-dlp README; firefox is not a curl_cffi target)
  • support-gated as before: the one-shot --list-impersonate-targets probe still vets the binary, now warmed at startup only when a target is picked
  • documented behavior change: the default is None (was always-on chrome)

Wiring: string key impersonate-browser (schema), bind_combo_row (existing pattern), the flag enters argv only in ytdlp_command(). Tests: default omits the flag; selecting a target produces exactly that flag; probe-failure path unchanged. Skipped: profile/OS variants (chrome:windows-10) and a dynamic --list-impersonate-targets population — add when someone needs them.

houssemko added 8 commits October 19, 2026 07:19
yt-dlp's --impersonate is documented as opt-in and its docs warn that
forcing impersonation on every request may hurt download speed and
stability, so the hard-coded --impersonate chrome becomes a
Preferences → Advanced → General dropdown: None (yt-dlp's documented
default, empty argv), Chrome, Edge or Safari. The choice rides on a
single chokepoint (ytdlp_command) that every yt-dlp spawn routes
through; the startup support probe only warms when a target is picked.
Note: the default flips from always-chrome to None.
impersonate_index/impersonate_value are the defense against a stale or
garbage stored target; cover the unknown-value and out-of-range
fallbacks like the codec helpers beside them. Restore the test's
impersonation value before asserting so a failure restores the memory
backend for sibling tests, and fold the support-probe doc comment back
onto one line.
@Linuxuser67
Linuxuser67 merged commit 962277f into main Oct 19, 2026
5 checks passed
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