Cleaned code

This commit is contained in:
2026-09-07 10:49:35 -06:00
parent 13e5d34446
commit 2e8a80c045
19 changed files with 142 additions and 161 deletions
+7 -2
View File
@@ -106,8 +106,13 @@
const response = await fetch("/status", { method: "GET" });
const statusJson = await response.json();
const currentInfo = statusJson.currentReleaseInfo;
statusMessage.innerHTML = createCard(currentInfo.artist, currentInfo.title, currentInfo.status, currentInfo.art_url);
if ("currentReleaseInfo" in statusJson) {
const currentInfo = statusJson.currentReleaseInfo;
statusMessage.innerHTML = createCard(currentInfo.artist, currentInfo.title, statusJson.status, currentInfo.art_url);
}
else {
statusMessage.innerHTML = `<p>${statusJson.status}</p>`;
}
queueTableBody.innerHTML = "";