This commit is contained in:
parent
eac9f80871
commit
031625f918
|
@ -69,10 +69,13 @@ const lastFM = {
|
|||
const lastFMElement = document.getElementById("lastfm")!
|
||||
lastFMElement.innerHTML = "";
|
||||
const img = document.createElement("img");
|
||||
img.width = 150
|
||||
img.height = 150
|
||||
img.width = 174
|
||||
img.height = 174
|
||||
img.alt = "last.fm album art"
|
||||
img.src = track.image.at(-1)?.["#text"]!;
|
||||
let imageUrl = track.image.find(z => z.size == "large")?.["#text"];
|
||||
if(!imageUrl) imageUrl = track.image.at(-1)?.["#text"]!;
|
||||
|
||||
img.src = imageUrl;
|
||||
lastFMElement?.appendChild(img);
|
||||
|
||||
const div = document.createElement("div");
|
||||
|
|
Loading…
Reference in a new issue