This commit is contained in:
ManeraKai 2024-07-09 14:15:00 +03:00
parent 9e6862ab1a
commit a20082de57
No known key found for this signature in database
GPG Key ID: 5ABC31FFD562E337
2 changed files with 15 additions and 1 deletions

View File

@ -396,6 +396,13 @@ function rewrite(url, frontend, randomInstance) {
return url.href
return `${randomInstance}${url.pathname}${url.search}`
}
case "freetubeMusic": {
if (url.hostname == "youtu.be" || url.hostname.endsWith("youtube.com") && url.pathname.startsWith("/live")) {
const watch = url.pathname.substring(url.pathname.lastIndexOf('/') + 1)
return `freetube://youtube.com/watch?v=${watch}`
}
return 'freetube://' + url.href
}
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)
@ -683,7 +690,7 @@ async function reverse(url) {
case "tekstowo":
return `${config.services[service].url}/${url.search.slice(1)}`
case "goodreads":
return `https://goodreads.com${url.pathname}${url.search}`
return `https://goodreads.com${url.pathname}${url.search}`
default:
return
}

View File

@ -159,6 +159,13 @@
"embeddable": true,
"instanceList": true,
"url": "https://invidious.io/"
},
"freetubeMusic": {
"name": "FreeTube",
"embeddable": false,
"desktopApp": true,
"instanceList": false,
"url": "https://github.com/FreeTubeApp/FreeTube"
}
},
"targets": [