feat: add twitch vod/clip support

This commit is contained in:
Snazzah
2023-04-29 14:33:36 -05:00
parent a25615982c
commit fa7af1bf44
7 changed files with 303 additions and 2 deletions

View File

@@ -84,6 +84,9 @@ export function cleanURL(url, host) {
if (url.includes('youtube.com/shorts/')) {
url = url.split('?')[0].replace('shorts/', 'watch?v=');
}
if (url.includes('clips.twitch.tv')) {
url = url.split('?')[0].replace('clips.twitch.tv/', 'twitch.tv/_/clip/');
}
return url.slice(0, 128)
}
export function verifyLanguageCode(code) {