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

Add support for clips from m.twitch.tv domain #239

Merged
merged 9 commits into from
Dec 14, 2021

Conversation

zneix
Copy link
Collaborator

@zneix zneix commented Dec 11, 2021

Pull request checklist:

  • CHANGELOG.md was updated, if applicable

Description

Closes #230

@zneix zneix requested a review from pajlada December 11, 2021 12:32
Copy link
Member

@pajlada pajlada left a comment

Choose a reason for hiding this comment

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

👍
Added some tests

Feel free to merge in when you're happy with things @zneix

@zneix
Copy link
Collaborator Author

zneix commented Dec 12, 2021

I dislike how invalid links can be seen as valid in new regex (e.g. https://m.twitch.tv/username/clip/clip/slug would be valid in terms of just regex, only further logic makes us consider it invalid), so I'm going to change it so that invalid links won't pass it and instead change the logic further in check.go to accommodate for the changed regex.

While attempting to change regex a bit I managed to come across this being seen as a valid Twitch clip link. While I decided to not go with my changes I think it's wise to keep the test case.
@zneix
Copy link
Collaborator Author

zneix commented Dec 14, 2021

Never mind the comment above, I spent 2 days on trying to over-engineer your regex pajlada and it added even more mess than it's worth it. I'm going to just merge this in instead.

@zneix zneix enabled auto-merge (squash) December 14, 2021 21:02
@zneix zneix merged commit dfb8924 into master Dec 14, 2021
@zneix zneix deleted the zneix/feature/include-mtwitchtv-in-twitchclip branch December 14, 2021 21:09
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.

Add m.twitch.tv/clip/ support
4 participants