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

Support short custom YouTube channel URLs #409

Merged
merged 9 commits into from
Oct 25, 2020

Conversation

Bartoshr
Copy link
Contributor

@Bartoshr Bartoshr commented Oct 9, 2020

  • I carefully read the contribution guidelines and agree to them.
  • I have tested the API against NewPipe.
  • I agree to create a pull request for NewPipe as soon as possible to make it compatible with the changed API.

What is it ?

fixes TeamNewPipe/NewPipe#3608

@TobiGr TobiGr added the youtube service, https://www.youtube.com/ label Oct 9, 2020
Copy link
Member

@TobiGr TobiGr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for contributing!

* @return true - if value conform to short channel url, false - not
*/
public boolean isCustomShortChannelUrl(String[] splitPath) {
return splitPath.length == 1 && !splitPath[0].matches("playlist|watch");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi. Thank you for review. Do you think that simply adding "attribution_link" to exlude those links with regex would be sufficent solution ? I couldn't come up with something better that that.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mmmh, probably a list of all pages not pointing to a channel should be added to that regex

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@opusforlife2
Copy link
Collaborator

@Bartoshr Instead of writing "fix for", could you write "closes" or "fixes"? This will ensure the linked issue automatically closes when this PR is merged.

@Bartoshr
Copy link
Contributor Author

@opusforlife2 Sure, i will keep that in mind.

Bartoshr and others added 5 commits October 12, 2020 19:56
Co-authored-by: Tobias Groza <TobiGr@users.noreply.github.com>
…youtube/linkHandler/YoutubeChannelLinkHandlerFactory.java


Fix typos

Co-authored-by: Tobias Groza <TobiGr@users.noreply.github.com>
Co-authored-by: Tobias Groza <TobiGr@users.noreply.github.com>
Copy link
Member

@Stypox Stypox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! Remember to add final anywhere possible.
@wb9688 I'd merge this after the changes are implemented, even though probably the list of possible hardcoded non-channel urls may be bigger. We can always add more later

Copy link
Member

@TobiGr TobiGr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Just a small change.

@TobiGr TobiGr requested a review from Stypox October 23, 2020 17:20
@TobiGr TobiGr changed the title Support short custom youtube channel urls Support short custom YouTube channel URLs Oct 23, 2020
Copy link
Member

@Stypox Stypox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@Stypox Stypox merged commit 8026304 into TeamNewPipe:dev Oct 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
youtube service, https://www.youtube.com/
Projects
None yet
Development

Successfully merging this pull request may close these issues.

youtube.com/username channel links aren't supported
4 participants