fix: clean up edge func
This commit is contained in:
parent
95e95861bf
commit
67722896b1
2 changed files with 4 additions and 4 deletions
|
@ -133,14 +133,14 @@ export default async () => {
|
||||||
return {}
|
return {}
|
||||||
});
|
});
|
||||||
const track = trackRes["recenttracks"]["track"][0];
|
const track = trackRes["recenttracks"]["track"][0];
|
||||||
const artist = artistCapitalization(track["artist"]["#text"]);
|
|
||||||
let mbid = track["artist"]["mbid"];
|
let mbid = track["artist"]["mbid"];
|
||||||
let genre = '';
|
let genre = '';
|
||||||
const mbidMap = (artist) => mbidRes[artist.toLowerCase()] || "";
|
|
||||||
const artistCapitalization = (artist) => artistCapitalzationRes[artist?.toLowerCase()] || artist
|
const artistCapitalization = (artist) => artistCapitalzationRes[artist?.toLowerCase()] || artist
|
||||||
|
const artist = artistCapitalization(track["artist"]["#text"]);
|
||||||
|
const mbidMap = () => mbidRes[track["artist"]["#text"].toLowerCase()] || "";
|
||||||
|
|
||||||
// mbid mismatches
|
// mbid mismatches
|
||||||
if (mbidMap(artist) !== "") mbid = mbidMap(artist);
|
if (mbidMap() !== "") mbid = mbidMap();
|
||||||
|
|
||||||
const artistUrl = mbid
|
const artistUrl = mbid
|
||||||
? `https://musicbrainz.org/artist/${mbid}`
|
? `https://musicbrainz.org/artist/${mbid}`
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "coryd.dev",
|
"name": "coryd.dev",
|
||||||
"version": "8.3.7",
|
"version": "8.3.8",
|
||||||
"description": "The source for my personal site. Built using 11ty.",
|
"description": "The source for my personal site. Built using 11ty.",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|
Reference in a new issue