From 4ba2201f4792a0bdfbbb0b95899655b79c75ef81 Mon Sep 17 00:00:00 2001 From: Cory Dransfeldt Date: Tue, 23 Apr 2024 15:38:29 -0700 Subject: [PATCH] chore: debug --- api/scrobble.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/api/scrobble.js b/api/scrobble.js index 30e16f40..9b5c6e63 100644 --- a/api/scrobble.js +++ b/api/scrobble.js @@ -54,16 +54,16 @@ export default async (request) => { artist, trackNumber, timestamp, - genre: artistsMap[artistSanitizedKey(artist)]?.['genre'] || '' + genre: artistsMap[artistSanitizedKey]?.['genre'] || '' } - console.log(artistsMap[artistSanitizedKey(artist)]) - console.log(artistsMap[artistSanitizedKey(artist)]?.['genre']) - console.log(artistsMap[artistSanitizedKey(artist)]?.['mbid']) + console.log(artistsMap[artistSanitizedKey]) + console.log(artistsMap[artistSanitizedKey]?.['genre']) + console.log(artistsMap[artistSanitizedKey]?.['mbid']) const scrobbleData = await scrobbles.get(`${weekKey()}`, { type: 'json'}) const windowData = await scrobbles.get('window', { type: 'json'}) - 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( + const artistUrl = (artistsMap[artistSanitizedKey]?.['mbid'] && artistsMap[artistSanitizedKey]?.['mbid'] !== '') ? `http://musicbrainz.org/artist/${artistsMap[artistSanitizedKey]?.['mbid']}` : `https://musicbrainz.org/search?query=${artist.replace( /\s+/g, '+' )}&type=artist`