Make the YouTube account reachable, and applied without a restart
The cookie login was not missing, it was buried: Downloads tab -> Custom Options -> the "Login with Cookies" tab, where Downloads is one tab of five. The three features that depend on it -- the Feed's account mode, Search and Browse -- are other tabs, with no route to it. show_cookie_login_dialog(), which opens that dialog on the right tab, had no caller anywhere in the codebase; it does now. An account button sits in the corner of the tab bar, visible from every tab, saying whether cookies are in use and where they came from. The Feed offers the same thing next to its account mode rather than greying the option out and leaving it at that, and the disabled entry now says why it is disabled. Applying cookies used to require a restart before playback saw them: _build_ytdl_raw_options was read once, when the player widget was built. A cookiesChanged signal now reaches the account button, the Feed and the live mpv handle, and the player reloads at its current position -- ytdl_hook consults the option when it resolves a URL, so anything already playing keeps the streams it resolved with. YtdlpClient needed no change: it re-reads config per call. Two bugs in the same function: the options are joined with commas and were never escaped, so a cookie path or a proxy URL containing one silently ended the option and started a bogus one; and geo_proxy_url was honoured by the downloader but never passed to the player, so a geo-restricted video would download and then refuse to play. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -12,6 +12,18 @@ records.
|
||||
|
||||
### Added
|
||||
|
||||
- **The YouTube account is findable.** Signing in with browser cookies was
|
||||
reachable only via Downloads → *Custom Options* → *Login with Cookies* — the
|
||||
last tab — while the features that need it (the Feed's account mode, Search,
|
||||
Browse) are other tabs with no route to it, and the method that opens that
|
||||
dialog on the right tab had no caller at all. There is now an account button
|
||||
in the corner of the tab bar, visible from everywhere, showing whether
|
||||
cookies are in use and which browser they came from. The Feed offers the same
|
||||
thing beside its account mode instead of just greying it out, and now says
|
||||
why it is unavailable.
|
||||
- **Cookie changes take effect immediately.** The player read them once, when
|
||||
it was built, so signing in only reached playback after restarting the app.
|
||||
It now reloads at the current position.
|
||||
- **The player responds to the keyboard and the mouse.** It had a key handler
|
||||
for Space, F and Escape that could never fire — nothing in the player set a
|
||||
focus policy, so focus always landed on a child button or slider, which
|
||||
@@ -76,6 +88,10 @@ records.
|
||||
|
||||
### Fixed
|
||||
|
||||
- The player's cookie and proxy options were joined with commas and never
|
||||
escaped, so a cookie path or a proxy URL containing one silently truncated
|
||||
the option and produced a bogus one. The geo-bypass proxy was honoured by the
|
||||
downloader but never passed to the player at all.
|
||||
- **The rest of the interface is themed.** `StyleSheet.MAIN` styled the window,
|
||||
inputs, buttons and tables and nothing else, so the main tab bar, combo
|
||||
boxes, sliders, lists, menus, splitters, tooltips and the horizontal
|
||||
|
||||
Reference in New Issue
Block a user