thrimbletrimmer: Use new API for listing thumbnails

This is just the minimum-effort way to keep thrimbletrimmer working with the new API.
More thrimbletrimmer changes to come later.
pull/415/head
Mike Lang 1 month ago committed by Mike Lang
parent e0fc1eaf08
commit 20ad8d3ec9

@ -272,9 +272,9 @@ window.addEventListener("DOMContentLoaded", async (event) => {
}); });
const thumbnailTemplateSelection = document.getElementById("video-info-thumbnail-template"); const thumbnailTemplateSelection = document.getElementById("video-info-thumbnail-template");
const thumbnailTemplatesListResponse = await fetch("/thumbnail-templates"); const thumbnailTemplatesListResponse = await fetch("/thrimshim/templates");
if (thumbnailTemplatesListResponse.ok) { if (thumbnailTemplatesListResponse.ok) {
const thumbnailTemplatesList = await thumbnailTemplatesListResponse.json(); const thumbnailTemplatesList = (await thumbnailTemplatesListResponse.json()).map(t => t.name);
thumbnailTemplatesList.sort(); thumbnailTemplatesList.sort();
for (const templateName of thumbnailTemplatesList) { for (const templateName of thumbnailTemplatesList) {
const templateOption = document.createElement("option"); const templateOption = document.createElement("option");

Loading…
Cancel
Save