From b59cbed552f8920868deb8d1aaced5f3f1bd9b1f Mon Sep 17 00:00:00 2001 From: Cory Dransfeldt Date: Fri, 8 Sep 2023 15:56:15 -0700 Subject: [PATCH] chore: link now playing track --- netlify/edge-functions/now-playing.js | 1 + src/_includes/partials/now/playing.liquid | 2 +- src/assets/scripts/script.js | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/netlify/edge-functions/now-playing.js b/netlify/edge-functions/now-playing.js index f517964c..6e8f62a0 100644 --- a/netlify/edge-functions/now-playing.js +++ b/netlify/edge-functions/now-playing.js @@ -58,6 +58,7 @@ export default async () => { return Response.json({ artist: track['artist']['#text'], title: track['name'], + url: track['url'], genre, emoji: emojiMap(genre, track['artist']['#text']), }) diff --git a/src/_includes/partials/now/playing.liquid b/src/_includes/partials/now/playing.liquid index 574d13db..7b88065e 100644 --- a/src/_includes/partials/now/playing.liquid +++ b/src/_includes/partials/now/playing.liquid @@ -4,6 +4,6 @@ - +

\ No newline at end of file diff --git a/src/assets/scripts/script.js b/src/assets/scripts/script.js index 9b647c2c..7dac00d6 100644 --- a/src/assets/scripts/script.js +++ b/src/assets/scripts/script.js @@ -7,6 +7,7 @@ const populateNowPlaying = (data) => { loading.style.display = 'none' emoji.innerText = data.emoji + content.href = data.url content.innerText = `${data.title} by ${data.artist}` emoji.classList.remove('hidden') content.classList.remove('hidden')