diff --git a/api/scrobble.js b/api/scrobble.js index 4a399cbd..eb5d1d63 100644 --- a/api/scrobble.js +++ b/api/scrobble.js @@ -56,11 +56,11 @@ export default async (request) => { artist, trackNumber, timestamp, - genre: artistsMap?.['genre'] || '' + genre: artistsMap[artistSanitizedKey(artist)]?.['genre'] || '' } const scrobbleData = await scrobbles.get(`${weekKey()}`, { type: 'json'}) const windowData = await scrobbles.get('window', { type: 'json'}) - const artistUrl = (artistsMap?.['mbid'] && artistsMap?.['mbid'] !== '') ? `http://musicbrainz.org/artist/${artistsMap?.['mbid']}` : `https://musicbrainz.org/search?query=${artist.replace( + const artistUrl = (artistsMap[artistSanitizedKey(artist)]?.['mbid'] && artistsMap[artistSanitizedKey(artist)]?.['mbid'] !== '') ? `http://musicbrainz.org/artist/${artistsMap[artistSanitizedKey(artist)]?.['mbid']}` : `https://musicbrainz.org/search?query=${artist.replace( /\s+/g, '+' )}&type=artist` diff --git a/package.json b/package.json index f6d69bf4..99b8114f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "coryd.dev", - "version": "12.9.2", + "version": "12.9.3", "description": "The source for my personal site. Built using 11ty.", "type": "module", "scripts": {