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

link fixes #21

Open
architdate opened this issue Jan 8, 2020 · 1 comment
Open

link fixes #21

architdate opened this issue Jan 8, 2020 · 1 comment

Comments

@architdate
Copy link

It seems like you are not parsing video links arguments like timestamp via youtube (?t=). Because of this whenever someone uses the .link command with a timestamped youtube url, the getVideoIdFromURL function just takes a substring after youtu.be/ or ?v= which may include other arguments such as timestamp. This leads to invalid IDs and so Kid A thinks that its an invalid video.

A suggested solution would be that once you calculate your ID your normal way, do something like: id = id.split('?')[0] to get the valid id without any arguments in them. You won't be able to do this directly to the passed url argument because that would truncate the non shortened youtube links which need the ?v= to work. I can open a pr to fix this, but since there is no CODE-OF-CONDUCT.md file to follow, I thought it might be better to leave this to you. Let me know if you require any further clarification

@Asheviere
Copy link
Owner

yeah that shouldn't be too hard to fix. Don't know how soon I'll be able to get to it, but yeah that's a good thing, never considered this was an edgecase.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants