From 72b33002f0783a5852cd1a910f9b35f13ec7cdc3 Mon Sep 17 00:00:00 2001
From: Cory Dransfeldt <coryd@hey.com>
Date: Fri, 29 Mar 2024 21:55:58 -0700
Subject: [PATCH] chore: scrobbling

---
 api/scrobble.js | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/api/scrobble.js b/api/scrobble.js
index 2750098a..964d3cf7 100644
--- a/api/scrobble.js
+++ b/api/scrobble.js
@@ -100,7 +100,7 @@ export default async (request) => {
       const artistObj = {
         mbid,
         genre,
-        image: `https://cdn.coryd.dev/artists/${encodeURIComponent(sanitizeMediaString(artist).replace(/\s+/g, '-').toLowerCase())}.jpg`
+        image: `https://cdn.coryd.dev/artists/${sanitizeMediaString(artist).replace(/\s+/g, '-').toLowerCase()}.jpg`
       }
       artistInfo = artistObj
       await artists.setJSON(artistKey, artistObj)
@@ -108,14 +108,12 @@ export default async (request) => {
 
     // if there is no album blob, populate one
     if (!albumInfo) {
-      console.log(`https://ws.audioscrobbler.com/2.0/?method=album.getinfo&api_key=${MUSIC_KEY}&artist=${encodeURIComponent(sanitizeMediaString(artist).replace(/\s+/g, '+').toLowerCase())}&album=${encodeURIComponent(sanitizeMediaString(album).replace(/\s+/g, '+').toLowerCase())}&format=json`)
       const albumRes = await fetch(
-        `https://ws.audioscrobbler.com/2.0/?method=album.getinfo&api_key=${MUSIC_KEY}&artist=${encodeURIComponent(sanitizeMediaString(artist).replace(/\s+/g, '+').toLowerCase())}&album=${encodeURIComponent(sanitizeMediaString(album).replace(/\s+/g, '+').toLowerCase())}&format=json`,
+        `https://ws.audioscrobbler.com/2.0/?method=album.getinfo&api_key=${MUSIC_KEY}&artist=${sanitizeMediaString(artist).replace(/\s+/g, '+').toLowerCase()}&album=${sanitizeMediaString(album).replace(/\s+/g, '+').toLowerCase()}&format=json`,
         {
           type: "json",
         }
       ).then((data) => {
-        console.log(data)
         if (data.ok) return data.json()
         throw new Error('Something went wrong with the Last.fm endpoint.');
       }).catch(err => {