Merge pull request #909 from sgvictorino/tent-redirect-music-path

Redirect Bandcamp /music to Tent artist page
This commit is contained in:
ManeraKai 2024-03-22 10:18:49 +00:00 committed by GitHub
commit 1e53685d4e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -367,7 +367,7 @@ function rewrite(url, frontend, randomInstance) {
if (url.hostname.endsWith('bandcamp.com')) {
const regex = /^(.*)\.bandcamp\.com/.exec(url.hostname)
const artist = regex[1]
if (url.pathname == '/') {
if (url.pathname == '/' || url.pathname == '/music') {
return `${randomInstance}/artist.php?name=${artist}`
} else {
const regex = /^\/(.*)\/(.*)/.exec(url.pathname)