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

Fixed youtu.be redirects #425

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

HeIIow2
Copy link

@HeIIow2 HeIIow2 commented Sep 5, 2023

When going to https://youtu.be/dQw4w9WgXcQ and redirecting to invidious, the video doesn't open, because invidious can't handle it.

This is mentioned in #286

Current behaviour

https://youtu.be/dQw4w9WgXcQ --> https://yt.artemislena.eu/

Wanted behaviour

https://youtu.be/dQw4w9WgXcQ --> https://yt.artemislena.eu/watch?v=dQw4w9WgXcQ

Approach

  • if it is a shortened link and it has not the search parameter v do the following
  • set the search parameter v to the path, but strip all /
  • set the path to /watch
  • delete the search parameter si

I am unsure about the last step though. It looks cleaner if the search parameter si is gone, but I really don't know what it is used for, it didn't make any kind of different for me.

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.

None yet

1 participant