From 891a4ade0218cc04a4d9bb263454a7074aaaa5f0 Mon Sep 17 00:00:00 2001 From: Cory Dransfeldt Date: Fri, 29 Mar 2024 15:20:50 -0700 Subject: [PATCH] chore: scrobbling --- api/scrobble.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/api/scrobble.js b/api/scrobble.js index 61a6250f..c6160d0b 100644 --- a/api/scrobble.js +++ b/api/scrobble.js @@ -101,8 +101,7 @@ export default async (request) => { // scrobble logic artistInfo = await artists.get(artistKey, { type: 'json'}) - console.log(artistInfo) - console.log(typeof artistInfo) + console.log('artistInfo', artistInfo) const artistUrl = `https://musicbrainz.org/artist/${artistInfo?.['mbid']}` const trackScrobbleData = { track, @@ -119,9 +118,11 @@ export default async (request) => { let windowUpdate = windowData; console.log('### SCROBBLE') console.log(scrobbleUpdate) + console.log('scrobbleUpdate["data"].length', scrobbleUpdate["data"].length) console.log('### SCROBBLE') console.log('### WINDOW') console.log(windowUpdate) + console.log('windowUpdate["data"].length', windowUpdate["data"].length) console.log('### WINDOW') if (scrobbleUpdate['data']) scrobbleUpdate['data'].push(trackScrobbleData) if (!scrobbleUpdate['data']) scrobbleUpdate = { data: [trackScrobbleData] }