This commit is contained in:
ManeraKai 2024-05-20 14:05:09 +03:00
parent 9d750897ec
commit 33fc116bac
No known key found for this signature in database
GPG Key ID: 5ABC31FFD562E337
1 changed files with 2 additions and 3 deletions

View File

@ -385,11 +385,10 @@ function rewrite(url, frontend, randomInstance) {
case "invidious": { case "invidious": {
if (url.hostname == "youtu.be" || url.hostname.endsWith("youtube.com") && url.pathname.startsWith("/live")) { if (url.hostname == "youtu.be" || url.hostname.endsWith("youtube.com") && url.pathname.startsWith("/live")) {
const watch = url.pathname.substring(url.pathname.lastIndexOf('/') + 1) const watch = url.pathname.substring(url.pathname.lastIndexOf('/') + 1)
return `${randomInstance}/watch?v=${watch}` return `${randomInstance}/watch?v=${watch}${url.search.replace("?", "&")}`
} }
if (url.hostname.endsWith("youtube.com") && url.pathname.startsWith("/redirect?")) { if (url.hostname.endsWith("youtube.com") && url.pathname.startsWith("/redirect?"))
return url.href return url.href
}
return `${randomInstance}${url.pathname}${url.search}` return `${randomInstance}${url.pathname}${url.search}`
} }
case "invidiousMusic": { case "invidiousMusic": {