This commit is contained in:
ManeraKai 2023-10-19 00:00:18 +03:00
parent 4e379b0623
commit 9317c75ea2
No known key found for this signature in database
GPG Key ID: 5ABC31FFD562E337
2 changed files with 33 additions and 20 deletions

View File

@ -496,6 +496,13 @@ function redirect(url, type, initiator, forceRedirection) {
} }
return `${randomInstance}${url.pathname}${url.search}` return `${randomInstance}${url.pathname}${url.search}`
} }
case "invidiousMusic": {
if (url.hostname == "youtu.be" || url.hostname.endsWith("youtube.com") && url.pathname.startsWith("/live")) {
const watch = url.pathname.substring(url.pathname.lastIndexOf('/') + 1)
return `${randomInstance}/watch?v=${watch}`
}
return `${randomInstance}${url.pathname}${url.search}`
}
case "libremdb": { case "libremdb": {
if (url.pathname.startsWith("/Name")) { if (url.pathname.startsWith("/Name")) {
for (const [key, value] of url.searchParams.entries()) { for (const [key, value] of url.searchParams.entries()) {

View File

@ -18,26 +18,6 @@
} }
}, },
"services": { "services": {
"youtubeMusic": {
"frontends": {
"hyperpipe": {
"name": "Hyperpipe",
"instanceList": true,
"url": "https://codeberg.org/Hyperpipe/Hyperpipe"
}
},
"targets": [
"^https?:\\/{2}music\\.youtube\\.com\\/"
],
"name": "YT Music",
"options": {
"enabled": false,
"frontend": "hyperpipe",
"unsupportedUrls": "bypass"
},
"imageType": "png",
"url": "https://music.youtube.com"
},
"youtube": { "youtube": {
"frontends": { "frontends": {
"invidious": { "invidious": {
@ -141,6 +121,32 @@
"embeddable": true, "embeddable": true,
"url": "https://youtube.com" "url": "https://youtube.com"
}, },
"youtubeMusic": {
"frontends": {
"hyperpipe": {
"name": "Hyperpipe",
"instanceList": true,
"url": "https://codeberg.org/Hyperpipe/Hyperpipe"
},
"invidiousMusic": {
"name": "Invidious",
"embeddable": true,
"instanceList": true,
"url": "https://invidious.io/"
}
},
"targets": [
"^https?:\\/{2}music\\.youtube\\.com\\/"
],
"name": "YT Music",
"options": {
"enabled": false,
"frontend": "hyperpipe",
"unsupportedUrls": "bypass"
},
"imageType": "png",
"url": "https://music.youtube.com"
},
"twitter": { "twitter": {
"frontends": { "frontends": {
"nitter": { "nitter": {