Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: route to invidious companion on downloads #5224

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

alexmaras
Copy link
Contributor

@alexmaras alexmaras commented Mar 29, 2025

This sets the download URL to invidious companion (as enabled in iv-org/invidious-companion#41) when companion is used.

There is a secondary way of approaching this - proxying the download through invidious. However, it looks like the CompanionConnectionPool is set up to only have a short timeout, and a download endpoint will need to allow for long requests.

Note that this approach embeds the companion URL in the page, which means the check param would eventually expire. It looks like that's 6 hours though, so I'm not sure that's too much of a concern.

There's also a couple of extra bits needed in companion to make this work well, all in iv-org/invidious-companion#95
That PR does 2 things:

  1. chunks up downloads so that companion isn't throttled by youtube servers
  2. ensures the check query param is passed on to the latestVersion call that's made so that it doesn't error out.

Without that PR merged, this still works, but only if verify_request is false in invidious-companion.

Addresses #5218

@alexmaras alexmaras requested a review from a team as a code owner March 29, 2025 07:06
@alexmaras alexmaras requested review from SamantazFox and removed request for a team March 29, 2025 07:06
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