2025-02-11 23:04:28 +01:00
|
|
|
const api = new API(API_URL);
|
|
|
|
|
|
|
|
const root = document.getElementById("root");
|
|
|
|
|
|
|
|
async function init() {
|
2025-02-12 23:40:37 +01:00
|
|
|
let library;
|
|
|
|
try {
|
|
|
|
library = await api.getLibrary("series");
|
|
|
|
} catch (e) {
|
|
|
|
showError(e);
|
|
|
|
return;
|
|
|
|
}
|
2025-02-11 23:04:28 +01:00
|
|
|
|
|
|
|
for (let group in library.videos) {
|
|
|
|
root.appendChild(components.series(group, library.videos[group]));
|
|
|
|
}
|
|
|
|
|
2025-02-12 23:40:37 +01:00
|
|
|
finishedLoading();
|
2025-02-11 23:04:28 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
init();
|