22 lines
353 B
JavaScript
22 lines
353 B
JavaScript
const api = new API(API_URL);
|
|
|
|
const root = document.getElementById("root");
|
|
|
|
async function init() {
|
|
let library;
|
|
try {
|
|
library = await api.getLibrary("series");
|
|
} catch (e) {
|
|
showError(e);
|
|
return;
|
|
}
|
|
|
|
for (let group in library.videos) {
|
|
root.appendChild(components.series(group, library.videos[group]));
|
|
}
|
|
|
|
finishedLoading();
|
|
}
|
|
|
|
init();
|