From 20ad8d3ec99d73461d74b8e3003ec13f737cd80c Mon Sep 17 00:00:00 2001 From: Mike Lang Date: Tue, 22 Oct 2024 14:34:51 +1100 Subject: [PATCH] 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. --- thrimbletrimmer/scripts/edit.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/thrimbletrimmer/scripts/edit.js b/thrimbletrimmer/scripts/edit.js index 3f317b2..f40b9a6 100644 --- a/thrimbletrimmer/scripts/edit.js +++ b/thrimbletrimmer/scripts/edit.js @@ -272,9 +272,9 @@ window.addEventListener("DOMContentLoaded", async (event) => { }); const thumbnailTemplateSelection = document.getElementById("video-info-thumbnail-template"); - const thumbnailTemplatesListResponse = await fetch("/thumbnail-templates"); + const thumbnailTemplatesListResponse = await fetch("/thrimshim/templates"); if (thumbnailTemplatesListResponse.ok) { - const thumbnailTemplatesList = await thumbnailTemplatesListResponse.json(); + const thumbnailTemplatesList = (await thumbnailTemplatesListResponse.json()).map(t => t.name); thumbnailTemplatesList.sort(); for (const templateName of thumbnailTemplatesList) { const templateOption = document.createElement("option");