Web: add comment to explain URL of last-rendered image

No functional changes.
This commit is contained in:
Sybren A. Stüvel 2022-06-30 19:27:54 +02:00
parent 0a0035eb5b
commit f5f63455d6

View File

@ -38,6 +38,9 @@ function setImageURL(thumbnailInfo) {
for (let suffix of thumbnailInfo.suffixes) { for (let suffix of thumbnailInfo.suffixes) {
if (!suffix.includes("-tiny")) continue; if (!suffix.includes("-tiny")) continue;
// This uses the API URL to construct the image URL, as the image comes from
// Flamenco Manager, and not from any development server that might be
// serving the webapp.
let url = new URL(api()); let url = new URL(api());
url.pathname = thumbnailInfo.base + "/" + suffix url.pathname = thumbnailInfo.base + "/" + suffix
url.search = new Date().getTime(); // This forces the image to be reloaded. url.search = new Date().getTime(); // This forces the image to be reloaded.