-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove dead code from program.getFastToc #264
Conversation
Your CI test complains about a line that wasn't modified. |
Thanks for this. I too have done something similar in a whipper fork and still don't understand why we need this in the first place. I'll need to take a closer look soon, but on first look this looks fine. |
Hmm... according to cdrdao's manpage the
To me it looks like this option introduces the following limitations:
|
HTOA should work with --fast-toc. I think alt. INDEX is also extracted. |
I found one CD containing index marks, and However, I noticed that the cue sheet of this CD generated by whipper only contains I'll create a new rip to check for reproducibility. I think it would be useful if whipper saved the TOC to a file inside of the target directoy, so subsequent invocations for failed rips could reuse them, possibly from different computers via a network share. The two drives I listed above, which fail to read almost all TOCs without the |
What CD would this be? As for caching the toc files, that has made my life a real pain at times, and I think whipper might do it, or might have done it at some point. But if it no longer does that, then please let'd not re-add that. It might be nice to save it -along- with the final rip, but not in any intermediate state. What drives do you use? |
The CD was Martin Buntrock - Meer: https://musicbrainz.org/release/04c6de86-a7f8-41c1-97b2-ab96e2b06dea I did a new rip, and this time all index marks were added to the cue sheet. I think whipper currently caches the TOC, but with one cache entry per drive offset, somewhere below ~/.cache/whipper/. I guess an alternative to caching the TOC would be to make the slow toc reading optional, so I could rip my scratched disks with the good drives, and then try to create a new cue sheet with one of the other drives. Drives I use, roughly sorted from worst to best error correction capabilities:
I wonder how CD players read the index marks. They surely don't need to scan the entire disk. |
Btw., maybe you could take just the first commit of this PR („Remove dead code from program.getFastToc“). |
@MerlijnWajer Using a search engine It's quite easy to find CDs which have index marks > 01: relying on EAC's generated cue sheets, just search for
From a quick test it seems I'm wrong (the manual seems to be too). Need to retest with more care ASAP.
This one seems to be confirmed by what @mtdcr reported. Ideas for further research:
👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I definitely want to keep accurate pre-gap support. I will do some research as well.
+1 to merging just 168d1f8ba97eb5c8402822f9ff86439c05256695
I like the idea of whipper writing a .toc file with the rip results, or at least logging the contents of it on disk.
whipper at some point in the past has supported caching the the toc & rip tables. However, it's a feature I've wanted to remove even if it's not already broken.
whipper/common/program.py
Outdated
from pkg_resources import parse_version as V | ||
version = cdrdao.getCDRDAOVersion() | ||
if V(version) < V('1.2.3rc2'): | ||
sys.stdout.write('Warning: cdrdao older than 1.2.3 has a ' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpick: indent the continued string lines below
whipper/common/program.py
Outdated
ptoc.persist(t.table) | ||
toc = ptoc.object | ||
t = cdrdao.ReadTOCTask(device) | ||
toc = t.table |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
toc = cdrdao.ReadTOCTask(device).table
@JoeLametta IA uses --fast-toc exclusively and I'm pretty sure it can rip HTOA and also get ISRC codes and such. I've spent quite some time doing vimdiff's and such of the various modes on most of the CDs I have. I can do it in a bit on this 101 bird songs CD. Actually, I'll do that now. I have not tested if it also works for CDs that have many tracks on other indices, but I would be surprised if it doesn't work. Yes, if you care about accurate pregaps, then you will have no option but to not use --fast-toc. I'm against saving the toc (or anything really) with the intent to use it to resume ripping (other purposes - great). IMHO that's just a hack and makes the code more dirty/complex. (I know we currently support resuming rips, kind of) |
OK, just tested it. Indeed with --fast-toc the four indexes on track 99 are not seen. Instead, they are all mended into a single track, so you still seemingly get all the audio, but some metadata is lost) That's a good argument to not use --fast-toc for whipper. (As for IA, I am not sure if we are likely to change this, given the immense perf hit). HTOA works though. |
The caching mechanism didn's have any effect. The inline function 'function' wasn't used anymore.
I've update my branch:
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Merged, thanks! |
With these changes I can finally use all of my drives.
Should fix or obsolete issues #72 and #173.
I compared read-toc and read-toc --fast-toc with many CDs in six different drives. With two of my drives, cdrdao created bad results, i.e. ISRC numbers with only one nonzero digit and weird time stamps:
For all other drives, read-toc --fast-toc always created the exact same result as without --fast-toc.