Repository navigation
Conversation
A track that fails every rip attempt is marked skipped and never gets a peak level, leaving trackResult.peak as None. writeLog() -> trackLog() then did an unconditional `trackResult.peak / 32768.0`, raising `TypeError: unsupported operand type(s) for /: 'NoneType' and 'float'` and aborting the whole run *after* every other track had ripped fine, so no log or cue file was written. This is easy to hit on enhanced/CD-Extra discs: the last audio track (right before the trailing data track) often fails to read, gets skipped with -k, and then takes the log-writer down. Guard the peak line so the "Peak level" entry is simply omitted for a track without a peak, matching cd.py which already avoids the same division for skipped tracks. Add a regression test covering a rip that contains a skipped track. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Signed-off-by: Mirko Köster <git@mirkokoester.de>
Accepts track numbers and ranges (3,5 or 3-7,10-13). Unselected tracks are left alone and logged as not selected. With --tracks, a finished rip of the disc can be ripped into: its log is kept and this run logs to '<disc> (tracks N).log'. Fixes whipper-team#578. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Mirko Köster <git@mirkokoester.de>
Reading the full TOC scans the whole disc, which takes minutes on a damaged one. With --tracks, the .toc an earlier rip saved is loaded instead when its disc ids match the inserted disc; --reread-toc forces reading it again. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Mirko Köster <git@mirkokoester.de>
A track that was skipped or not selected has no file; that is expected. Log it once as a warning instead of two checksum errors, and report a skipped track as 'not ripped (skipped)' instead of an error. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Mirko Köster <git@mirkokoester.de>
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.
Fixes #578.
Depends on #694, which is the first commit here: without it, writing the log crashes on every track that is not ripped. Please review the last three commits; I'll rebase once #694 is merged.
whipper cd rip -t/--tracks 3,5or--tracks 3-7,10-13rips only the given tracks. The main use is retrying a track that failed on an earlier rip, without reading the rest of the disc again. It is an include list, as suggested in the review of #260.Behaviour
0, numbers above the track count,7-3, and malformed items give a one-line error without a traceback. Syntax errors are caught before the TOC is read; the track count is checked once it is known.not_selectedflag.Track not ripped (not selected).Only selected tracks were ripped.not ripped (not selected).--tracks(without it, it is still refused)..logis kept, and this run's log is written as<disc> (tracks 24).log. The.cueand.m3uare rewritten; the m3u lists every track whose file exists.<disc>.toc) is reused with--tracks, instead of runningcdrdao read-tocagain. That read scans the whole disc and takes minutes on a damaged one.--reread-tocforces reading it.Also in here, because every partial rip triggers it: a track without a file (skipped or not selected) no longer logs two
could not calculate AccurateRip checksumerrors, only the existing warning. A track that failed with-kis reported asnot ripped (skipped)instead ofunknown (error). The errors remain for a file that exists but cannot be checksummed.Tests
-t 19-24into an existing rip left tracks 1–17 untouched and verified all present files against AccurateRip.-t 24 -r 0reused the saved TOC, recovered a track that had failed in two earlier runs, and verified it as accurate.This touches the same rip loop in
cd.pyas #702 and #711, so one of them will need a rebase.🤖 Generated with Claude Code