Closed ElementalAlchemist closed 2 years ago
Does it? The submit code does this:
if (thumbnailMode === "CUSTOM") {
const fileInput = document.getElementById("video-info-thumbnail-custom");
if (fileInput.files.length === 0) {
if (!videoInfo.thumbnail_image) {
submissionResponseElem.innerText =
"A thumbnail file was not provided for the custom thumbnail";
submissionResponseElem.classList.value = ["submission-response-error"];
return;
}
thumbnailImage = videoInfo.thumbnail_image;
} else {
// snip (reads the file and base64s the data; see changes for full implementation)
}
}
I'm not sure how this doesn't handle the first case (please let me know what I'm missing). I'm happy to do the second as well, but it sounds like that should happen in tandem with the backend support for it.
Oh, I missed the if (!videoInfo.thumbnail_image)
part - my brain skipped straight to the error handling. That sounds good then.
Manually merged after rebasing out the merge commits and handling conflicts.
Adds Thrimbletrimmer support for all the new thumbnails fanciness. (This PR builds on #297 and therefore merges into that branch.)
This includes all the front-end UI for various useful tasks:
Notable issues:
b64decode
, which my install of Python does not for the same file/data, and it further fails trying to catch the error raised, so more useful information isn't shown to me.) I expect this should be resolved as part of #297 before it merges, but if there's secretly something I'm able to do about it, I'll give it another poke.