[previews] Fix upload error messages, frame extraction and eraser rendering#1099
Merged
Conversation
Kitsu's new vector eraser stores an `eraser` object on each erasable shape: a fabric Group of paths in the parent's local centered frame, composited destination-out at render time. Mirror that on the Pillow side: render the parent on a fresh transparent layer, stamp the eraser paths into an L-mode mask (chaining path-local → eraser-centered → parent-centered → canvas → image transforms), and subtract the mask from the layer's alpha before compositing onto the overlay. The path-to-segments flattener is extracted from `_draw_path` so the mask renderer reuses it. Tests cover hole-in-rect, eraser-follows- rotated-parent, isolation from siblings, PSStroke mid-segment erase and the empty-eraser no-op.
ffmpeg ≥ 6's image2 muxer refuses non-pattern output filenames unless `-update 1` is set, logging "filename does not contain an image sequence pattern" and intermittently skipping the write. Frame extraction and thumbnail generation both target a plain `.png` path, so they now pass `update=1` alongside `vframes=1`. The option is a no-op on older ffmpeg.
Make the revision-conflict message actionable instead of a bare "Revision N already exists for this task." (tells the user to pick another revision or omit it to auto-increment). Stop mislabelling every movie failure as "Normalization failed.": when normalization is disabled the message no longer mentions it, and a genuine server-side processing failure (ffmpeg, storage) is now reported as a 500 carrying the underlying cause in data.reason rather than a misleading 400. A bad upload (empty/corrupted transfer) still returns 400. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problems
Solutions
data.reason(400 kept only for bad uploads)update=1to ffmpeg when writing a single PNG frame