From f4d1e621bc7372b36111fe180d6162052bc21d91 Mon Sep 17 00:00:00 2001 From: Cory Dransfeldt Date: Fri, 29 Mar 2024 12:07:04 -0700 Subject: [PATCH] chore: scrobbling --- api/scrobble.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/scrobble.js b/api/scrobble.js index ef3cdf92..0d43855e 100644 --- a/api/scrobble.js +++ b/api/scrobble.js @@ -57,9 +57,9 @@ export default async (request, context) => { console.log(err); return {} }); - const track = trackRes["recenttracks"]["track"][0]; + const trackData = trackRes["recenttracks"]["track"][0]; let mbid = trackRes['track']['artist']['mbid'] - const mbidMap = () => mbidRes[track["artist"]["#text"].toLowerCase()] || ""; + const mbidMap = () => mbidRes[trackData['artist']['#text'].toLowerCase()] || ""; // mbid mismatches if (mbidMap() !== "") mbid = mbidMap();