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

Custom share url (ex.: invidio instead of youtube) #2748

Closed
wants to merge 8 commits into from

Conversation

XiangRongLin
Copy link
Collaborator

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

@XiangRongLin XiangRongLin changed the title Invidio Custom share url (ex.: invidio instead of youyube) Oct 21, 2019
@XiangRongLin XiangRongLin changed the title Custom share url (ex.: invidio instead of youyube) Custom share url (ex.: invidio instead of youtube) Oct 21, 2019
@XiangRongLin
Copy link
Collaborator Author

I just realised that there is a SoundCloud and MediaCCC section. Will need to check if those sections still work.

@Stypox
Copy link
Member

Stypox commented Oct 22, 2019

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.

@XiangRongLin
Copy link
Collaborator Author

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.
In most cases i have access to a subclass of Info, but there are 2 cases where i only have access to a subclass of InfoItem. 1 2. I'm not too sure how to solve it for these cases, without extracting it from the url.

Also my current way breaks sharing of channels, playlists.

@pred2k
Copy link

pred2k commented Oct 29, 2019

How about having that feature enabled by default?

@TobiGr
Copy link
Contributor

TobiGr commented Nov 1, 2019

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.

@XiangRongLin
Copy link
Collaborator Author

To be honest, i can't figure it out where and how to excatly start with changing that in the extractor.

@Stypox
Copy link
Member

Stypox commented Nov 6, 2019

If I find some time in the next days I will try to give you some directions, thank you for the effort ☺

@seniorm0ment
Copy link

Awesome!

@XiangRongLin XiangRongLin deleted the invidio branch March 29, 2020 08:18
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.

5 participants