Skip to content

Commit

Permalink
Added ytify #951
Browse files Browse the repository at this point in the history
  • Loading branch information
ManeraKai committed Aug 17, 2024
1 parent 5a503e9 commit e96ac0c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/assets/javascripts/services.js
Original file line number Diff line number Diff line change
Expand Up @@ -565,6 +565,15 @@ function rewrite(url, frontend, randomInstance) {

return `${randomInstance}${url.pathname}${url.search}`
}
case "ytify": {
if (url.pathname.startsWith('/watch')) return `${randomInstance}/?s=${encodeURIComponent(url.searchParams.get('v'))}`

const channelReg = /\/channel\/([^\/]+)/.exec(url.pathname)
if (channelReg) return `${randomInstance}/list?channel=${channelReg[1]}`

if (url.pathname.startsWith('/playlist')) return `${randomInstance}/list?playlists=${encodeURIComponent(url.searchParams.get('list'))}`
return `${randomInstance}${url.pathname}${url.search}`
}
case "piped":
case "pipedMaterial":
case "cloudtube":
Expand Down Expand Up @@ -818,7 +827,8 @@ const defaultInstances = {
freetar: ["https://freetar.de"],
ratAintTieba: ["https://rat.fis.land"],
shoelace: ["https://shoelace.mint.lgbt"],
skunkyArt: ["https://skunky.bloat.cat/"],
skunkyArt: ["https://skunky.bloat.cat"],
ytify: ["https://ytify.netlify.app"],
}

function initDefaults() {
Expand Down
6 changes: 6 additions & 0 deletions src/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,12 @@
"embeddable": false,
"instanceList": true,
"url": "https://github.com/ViewTube/viewtube"
},
"ytify": {
"name": "ytify",
"embeddable": false,
"instanceList": true,
"url": "https://github.com/n-ce/ytify/"
}
},
"targets": [
Expand Down

0 comments on commit e96ac0c

Please sign in to comment.