Skip to content

Cannot unset "Retrieve cookies from browser" once a browser has been chosen #776

Description

@iainelder

Summary

In the Download options dialog, on the Files → Cookies sub-tab, once the Browser dropdown has been set to a non-empty value, it cannot be cleared through the UI. Selecting the empty entry from the dropdown and pressing Apply does not persist the change — the dropdown reverts to its previous value, and the generated yt-dlp command continues to contain --cookies-from-browser <browser>.

Environment

  • Tartube: v2.5.197
  • Installed via: python3-tartube_2.5.197-STRICT.deb from the GitHub release
  • OS: Ubuntu 24.04.4 LTS
  • Desktop: GNOME Shell 46.0 on Wayland (running through XWayland)
  • Python: 3.12.3
  • GTK: 3.24.41

Steps to reproduce

  1. Right-click any media item in the video index → Downloads ▸ Edit download options….
  2. Open the Files tab, then the Cookies sub-tab.
  3. In the Browser dropdown, select firefox (I didn't test the other entries).
  4. Click Apply, then OK.
  5. Download the media item. Confirm the yt-dlp command contains --cookies-from-browser firefox.
  6. Re-open the same dialog. Confirm the Browser dropdown still shows firefox (value was saved).
  7. In the Browser dropdown, select the empty entry at the top of the list.
  8. Click Apply, then OK.

Expected

After step 8:

  • The Browser dropdown shows the empty entry.
  • The generated yt-dlp command no longer contains --cookies-from-browser.

Actual

After step 8:

  • The Browser dropdown reverts to firefox.
  • The generated yt-dlp command still contains --cookies-from-browser firefox.

Impact

Because the value cannot be cleared from the UI, yt-dlp continues to read cookies from the configured browser on every download. For users who have a logged-in Google session in that browser, every download then runs under that account. This was confirmed by the following line appearing in yt-dlp's debug output after step 5:

[debug] [youtube] Detected YouTube Premium subscription

Workaround

The value can only be cleared outside the UI:

  1. Export the download options to JSON (System preferences → Options → Export).
  2. Edit the JSON and change "cookies_from_browser": "firefox" to "cookies_from_browser": "".
  3. Import the edited JSON as a new options set.
  4. Reassign the new set to the affected media item and delete the original.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions