fix: fallback urls

This commit is contained in:
Cory Dransfeldt 2024-03-19 15:46:02 -07:00
parent 98e3d674e6
commit 2cf86f95d9
No known key found for this signature in database
2 changed files with 3 additions and 9 deletions

View file

@ -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`;

View file

@ -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": {