Skip to content
This repository has been archived by the owner on Jul 26, 2020. It is now read-only.

Import using video URL #19

Merged
merged 2 commits into from
May 17, 2019
Merged

Import using video URL #19

merged 2 commits into from
May 17, 2019

Conversation

jmickey
Copy link
Member

@jmickey jmickey commented May 16, 2019

Closes #18.

image

@jmickey jmickey added enhancement New feature or request xp/developer Aims to improve the experience for BreadTube developers needs review ready for developers to review code labels May 16, 2019
@jmickey jmickey requested a review from a team May 16, 2019 18:33
@jmickey jmickey self-assigned this May 16, 2019
…-url

* origin/master:
  Add API key option for use in CI (#14)
Copy link
Member

@dirkkelly dirkkelly left a comment

Choose a reason for hiding this comment

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

Happy for us to merge this and refactor the regex in a further PR.

}

if url != "" {
re := regexp.MustCompile(`(?:v|embed|watch\?v)(?:=|/)([^"&?/=%]{11})`)
Copy link
Member

Choose a reason for hiding this comment

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

Another valid format is https://youtu.be/rURhJr0cDnk and it's been used in a few submissions so far.

I'd be happy for us to have limitations on acceptable formats for simplicity sake, eg:

Perhaps the regex is something along the lines of v=XXX or final slash and everything after.

Say I tried https://youtu.be/rURhJr0cDnk?rofl=lmao I would be happy for the parser to fail.

@jmickey jmickey merged commit 97254c5 into master May 17, 2019
@jmickey jmickey deleted the feature/allow-video-url branch May 17, 2019 11:59
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request needs review ready for developers to review code xp/developer Aims to improve the experience for BreadTube developers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Accept full URLs for video import
2 participants