[reject_files_larger_than_original] v0.0.5: optional size tolerance - #513
Open
funkekaiser wants to merge 1 commit into
Open
[reject_files_larger_than_original] v0.0.5: optional size tolerance#513funkekaiser wants to merge 1 commit into
funkekaiser wants to merge 1 commit into
Conversation
Add an optional size tolerance (slider, default 0% = behaviour unchanged). Remux-style worker tasks that only rewrite container metadata can grow a file by a few bytes — e.g. Apple HEVC's hev1->hvc1 codec-tag rewrite with '-movflags +faststart' relocates the moov atom and added 39 bytes on a 476MB file. With a strict greater-than comparison the plugin rejects the result, and the task still completes 'successful' — so plugins like 'Ignore completed tasks' then permanently block the intended change from ever being applied. A small tolerance lets users accept insignificant container overhead while still rejecting genuinely larger encodes. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Author
|
Testing note (per CONTRIBUTING quality control): verified against Unmanic |
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.
Problem
The strict
>size comparison interacts badly with remux-style worker tasks. Example from a real library: Apple HEVC's hev1→hvc1 codec-tag rewrite (-c:v copy -tag:v:0 hvc1 -movflags +faststart) relocates the moov atom and made a 476,042,676-byte file 39 bytes larger. This plugin rejected the result and reset the source file — but the task still completed "successful".That combination is worse than a no-op: with "Ignore completed tasks" enabled (or this plugin's own ignore option), the file is now permanently blocked from ever receiving its intended change, and the rejection is invisible unless you read the task log. In our case ~50 remuxes per hour were being silently nullified this way.
Fix
Add an optional tolerance slider (percent, default 0 — behaviour completely unchanged unless the user opts in). With e.g. 1%, container-overhead growth passes while genuinely larger encodes (typically +10–30%) are still rejected.
Version bumped to 0.0.5 with a changelog entry.
🤖 Generated with Claude Code