Compare commits

..

No commits in common. "master" and "master" have entirely different histories.

1 changed files with 1 additions and 11 deletions

View File

@ -4,16 +4,6 @@ import { mapNullable } from '/services/misc.js'
const LINK_RE = /<(.+?)>; rel="(\w+)"/gi
// Add compatibility for links of known invidious/piped instances
const YoutubeInstances = [
'youtube.com', 'm.youtube.com', 'music.youtube.com',
'invidio.us', 'redirect.invidious.io',
'invidious.snopyta.org', 'yewtu.be', 'invidious.kavin.rocks', 'vid.puffyan.us', 'invidious.namazso.eu', 'inv.riverside.rocks', 'invidious.osi.kr', 'youtube.076.ne.jp', 'yt.artemislena.eu', 'tube.cthd.icu', 'invidious.flokinet.to', 'invidious.weblibre.org', 'invidious.esmailelbob.xyz', 'invidious.lunar.icu', 'invidious.mutahar.rocks', 'inv.bp.projectsegfau.lt', 'y.com.sb', 'invidious.sethforprivacy.com', 'invidious.tiekoetter.com', 'invidious.hub.ne.kr',
'videos.arci.me', 'octt.ddns.net:48864',
'c7hqkpkpemu6e7emz5b4vyz7idjgdvgaaa3dyimmeojqbgpea3xqjoid.onion', 'w6ijuptxiku4xpnnaetxvnkc5vqcdu7mgns2u77qefoixi63vbvnpnqd.onion', 'kbjggqkzv65ivcqj6bumvp337z6264huv5kpkwuv6gu5yjiskvan7fad.onion', 'grwp24hodrefzvjjuccrkw3mjq4tzhaaq32amf33dzpmuxe7ilepcmad.onion', 'osbivz6guyeahrwp2lnwyjk2xos342h4ocsxyqrlaopqjuhwn2djiiyd.onion', 'u2cvlit75owumwpy4dj2hsmvkq7nvrclkpht7xgyye2pyoxhpmclkrad.onion', 'euxxcnhsynwmfidvhjf6uzptsmh4dipkmgdmcmxxuo7tunp3ad2jrwyd.onion',
'kavin.rocks', 'silkky.cloud', 'tokhmi.xyz', 'moomoo.me', 'il.ax', 'mha.fi', 'shimul.me', 'mint.lgbt', 'privacy.com.de'
]
function parseLinkHeader(linkHeader) {
const links = new Map()
@ -206,7 +196,7 @@ const findMedia = status => execPipe(
map(url => {
const { hostname, pathname, searchParams } = new URL(url)
if (YoutubeInstances.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') } }
} else if (hostname === 'youtu.be') {
return { url, credentials: { type: 'youtube', id: pathname.substring(1) } }