fix: compare playlists, not durations, to detect a shifted enumeration #7
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/rip-disc-false-positive"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The duration check I added in #5 aborted a correct rip. On a season 7 disc:
Same playlist, same enumeration — which is to say the right title. The scan
reports whole seconds while
ffprobemeasures the muxed stream, and a couple ofseconds of disagreement is routine. Having aborted, it skipped the disc's two
remaining titles, which had to be ripped again.
Duration was the wrong signal to lead with. The playlist each index resolves
to is the ground truth: a shifted enumeration means index N mapped to a
different playlist than the scan recorded for it. That is now the abort
condition; a duration disagreement is merely noted.
Verification
Both real cases, replayed from their actual logs:
00800.mpls→00800.mpls00800.mpls→00304.mplsSo the check still catches the failure it was written for, and no longer fires
on measurement noise.
--tolerancenow controls when a duration difference is reported rather thanwhen the run aborts, and defaults to 5s.
The duration check aborted a correct rip. On a season 7 disc it reported WRONG TITLE t3: expected 3521s, got 3523s scan title 3 = 00800.mpls | rip title 3 = 00800.mpls scan enumerated 14 titles, this rip enumerated 14 -- the same playlist under the same enumeration, which is to say the right title. The scan reports whole seconds while ffprobe measures the muxed stream, and roughly two seconds of disagreement is routine. Having aborted, it skipped the disc's two remaining titles, which then had to be ripped again. Duration was the wrong signal to lead with. The playlist each index resolves to is the ground truth: a shifted enumeration means index N mapped to a DIFFERENT playlist than the scan recorded. That is now the abort condition, and a duration disagreement is merely noted. Verified against both real cases: the season 7 rip is accepted (00800.mpls both sides, 14 titles both sides), and the season 5 divergence still aborts (00800.mpls vs 00304.mpls, 29 titles vs 26).