add invidio.us to youtube support (close gh-5)

This commit is contained in:
wryk 2020-07-16 19:17:57 +02:00
parent 1e98206f43
commit 259ba094f7
1 changed files with 1 additions and 1 deletions

View File

@ -196,7 +196,7 @@ const findMedia = status => execPipe(
map(url => { map(url => {
const { hostname, pathname, searchParams } = new URL(url) const { hostname, pathname, searchParams } = new URL(url)
if (['youtube.com', 'm.youtube.com', 'music.youtube.com'].includes(hostname) && searchParams.has('v')) { if (['youtube.com', 'm.youtube.com', 'music.youtube.com', 'invidio.us'].includes(hostname) && searchParams.has('v')) {
return { url, credentials: { type: 'youtube', id: searchParams.get('v') } } return { url, credentials: { type: 'youtube', id: searchParams.get('v') } }
} else if (hostname === 'youtu.be') { } else if (hostname === 'youtu.be') {
return { url, credentials: { type: 'youtube', id: pathname.substring(1) } } return { url, credentials: { type: 'youtube', id: pathname.substring(1) } }