dbvideostriketeam / wubloader

MIT License
15 stars 8 forks source link

Thrimbletrimmer support for thumbnails #299

Closed ElementalAlchemist closed 2 years ago

ElementalAlchemist commented 2 years ago

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:

ElementalAlchemist commented 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.

ekimekim commented 2 years ago

Oh, I missed the if (!videoInfo.thumbnail_image) part - my brain skipped straight to the error handling. That sounds good then.

ekimekim commented 2 years ago

Manually merged after rebasing out the merge commits and handling conflicts.