fix: url encoding

This commit is contained in:
Cory Dransfeldt 2024-03-17 14:21:46 -07:00
parent 283a15d083
commit 2bf1fbeaee
No known key found for this signature in database
3 changed files with 4 additions and 4 deletions

View file

@ -23,7 +23,7 @@ export default async function () {
title: artist['name'],
plays: artist['playcount'],
rank: artist['@attr']['rank'],
image: `https://cdn.coryd.dev/artists/${removeAccents(artist['name']).replace(/\s+/g, '-').toLowerCase()}.jpg`,
image: `https://cdn.coryd.dev/artists/${encodeURIComponent(removeAccents(artist['name']).replace(/\s+/g, '-').toLowerCase())}.jpg`,
url: mbid
? `https://musicbrainz.org/artist/${mbid}`
: `https://musicbrainz.org/search?query=${artist['name'].replace(