improve gang
All checks were successful
/ test (push) Successful in 13s

This commit is contained in:
Soph :3 2024-08-01 23:18:22 +03:00
parent eac9f80871
commit 031625f918
Signed by: sophie
GPG key ID: EDA5D222A0C270F2

View file

@ -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");