Revert "fix: that's just absurd. stop."
This reverts commit 1a68888350
.
This commit is contained in:
parent
19bd752c2b
commit
100ffd1675
1 changed files with 2 additions and 12 deletions
|
@ -23,14 +23,6 @@ const artistAliases = {
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
|
|
||||||
const sanitizeTrack = (track) => {
|
|
||||||
track.replace(
|
|
||||||
'(2001 Version) [feat. Markus Johnsson, Thomas Einarsson, Tobias Gustavsson & Daniel Erlandsson] [2001]',
|
|
||||||
''
|
|
||||||
)
|
|
||||||
return track
|
|
||||||
}
|
|
||||||
|
|
||||||
const aliasArtist = (artist) => {
|
const aliasArtist = (artist) => {
|
||||||
const aliased = artistAliases.aliases.find((alias) => alias.aliases.includes(artist))
|
const aliased = artistAliases.aliases.find((alias) => alias.aliases.includes(artist))
|
||||||
if (aliased) artist = aliased.artist
|
if (aliased) artist = aliased.artist
|
||||||
|
@ -99,10 +91,8 @@ export default async () => {
|
||||||
: `https://musicbrainz.org/search?query=${track['artistName'].replace(/\s+/g, '+')}&type=artist`
|
: `https://musicbrainz.org/search?query=${track['artistName'].replace(/\s+/g, '+')}&type=artist`
|
||||||
|
|
||||||
return Response.json({
|
return Response.json({
|
||||||
text: `🎧 ${sanitizeTrack(track['name'])} by ${artist}`,
|
text: `🎧 ${track['name']} by ${artist}`,
|
||||||
html: `🎧 <a href="${trackUrl}">${sanitizeTrack(
|
html: `🎧 <a href="${trackUrl}">${track['name']}</a> by <a href="${artistUrl}">${artist}</a>`,
|
||||||
track['name']
|
|
||||||
)}</a> by <a href="${artistUrl}">${artist}</a>`,
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Reference in a new issue