From 2cf86f95d983b730c13774099f876c61642fa5b0 Mon Sep 17 00:00:00 2001 From: Cory Dransfeldt Date: Tue, 19 Mar 2024 15:46:02 -0700 Subject: [PATCH] fix: fallback urls --- api/now-playing.js | 10 ++-------- package.json | 2 +- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/api/now-playing.js b/api/now-playing.js index 177f06ce..b139e693 100644 --- a/api/now-playing.js +++ b/api/now-playing.js @@ -144,16 +144,10 @@ export default async () => { const artistUrl = mbid ? `https://musicbrainz.org/artist/${mbid}` - : `https://musicbrainz.org/search?query=${track["artist"]["#text"].replace( - /\s+/g, - "+" - )}&type=artist`; + : `https://last.fm/music/${track["artist"]["#text"].toLowerCase().replace(/\s+/g, "+")}`; const trackUrl = track["mbid"] ? `https://musicbrainz.org/track/${track["mbid"]}` - : `https://musicbrainz.org/search?query=${track["artist"]["#text"].replace( - /\s+/g, - '+' - )}&type=artist`; + : track['url']; if (mbid && mbid !== "") { const genreUrl = `https://musicbrainz.org/ws/2/artist/${mbid}?inc=aliases+genres&fmt=json`; diff --git a/package.json b/package.json index fc8a61ef..6bb8d65b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "coryd.dev", - "version": "8.3.8", + "version": "8.3.9", "description": "The source for my personal site. Built using 11ty.", "type": "module", "scripts": {