-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Custom share url (ex.: invidio instead of youtube) #2748
Conversation
User can set custom website with which the url for the "share" function are set. Added switch to activate this function and edit text to input the website url. For example instead of "https://youtube.com/watch?v=abcdefg", it will be "https://invidio.us/watch?v=abcdefg"
Display a toast when url is invalid.
I just realised that there is a SoundCloud and MediaCCC section. Will need to check if those sections still work. |
This probably needs to be changed in the extractor: you would need to add a command to every extractor (add a base method) that returns all of the possible share URLs. Those share URLs would extend a base share-URL class that has the methods to get a representation of the URL to show to the user and to get the real URL based on the ID. |
So after some digging I found out, that the extractor already has the functionality to extract the id. It gets saved into Info, but not into InfoItem. Also my current way breaks sharing of channels, playlists. |
So youtube.com/watch?v=videoId instead or youtu.be/videoId
How about having that feature enabled by default? |
I agree with @Stypox. A proper implementation of this feature requires extractor changes. IMO, this would also require us to list supported URLs in the YouTubeParsingHelper. We only use checks whether an URL is a YouTube/Invidio/HooktubeURL. The domains used in these methods should be moved to a list. |
To be honest, i can't figure it out where and how to excatly start with changing that in the extractor. |
If I find some time in the next days I will try to give you some directions, thank you for the effort ☺ |
Awesome! |
Added an option for user to select the way the url are generated for the "share" function. If the custom option is activated then the url will be generated with the given base.
For example: "https://invidio.us/watch?v=abcdefg" instead of "https://youtube.com/watch?v=abcdefg"
By default turned off. When turned on the default custom website is "https://invidio.us", but can be changed.
Related issue: #2351