chore: update stuff

This commit is contained in:
MattTheTekie 2026-02-27 17:19:25 -05:00
commit 9c92f4930f

View file

@ -17,25 +17,32 @@ let NAV_PREV = document.getElementById("navMusicPrevious");
// LOAD MUSIC DATA
// ===============================
async function loadMusicData() {
const response = await fetch("https://corsproxy.io/?url=https://frutigeraeroarchive.org/data/music.min.json");
const response = await fetch("https://frutigeraeroarchive.org/data/music.min.json");
const data = await response.json();
const section = data.ols.find(item => item["@id"] === "frutigerAeroBliss");
if (!section) return [];
return section.li.map(item => ({
title: item.a.title,
url: "https://frutigeraeroarchive.org/music/" + item.a["@data-src-mp3"],
background: item.a["@data-background"] || "",
artist: item.a["@data-artist"] || "",
spotify: item.a["@data-spotify"] || "",
youtube: item.a["@data-youtube"] || "",
description: item.a["@data-description"] || "",
copyright: item.a["@data-copyright"] || "",
date: item.a["@data-date"] || ""
}));
}
return section.li.map(item => {
const raw = item.a["@data-src-mp3"];
const fullUrl = raw.startsWith("/")
? "https://frutigeraeroarchive.org" + raw
: "https://frutigeraeroarchive.org/music/" + raw;
return {
title: item.a.title,
url: fullUrl,
background: item.a["@data-background"] || "",
artist: item.a["@data-artist"] || "",
spotify: item.a["@data-spotify"] || "",
youtube: item.a["@data-youtube"] || "",
description: item.a["@data-description"] || "",
copyright: item.a["@data-copyright"] || "",
date: item.a["@data-date"] || ""
};
});
}
// ===============================
// CREATE PLAYLIST