-
Notifications
You must be signed in to change notification settings - Fork 90
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
rip cd info seems to fail #3
Comments
Below I'm including, available to the public, the temporary ugly fix which solves this bug: --- cd.py
+++ cd_fix.py
@@ -113,11 +113,19 @@
self.program.ejectDevice(self.device)
return -1
- # now, read the complete index table, which is slower
+ # Ugly fix for broken commit
+ offset = 0
+ info = drive.getDeviceInfo(self.parentCommand.options.device)
+ if info:
+ try:
+ offset = self.getRootCommand().config.getReadOffset(*info)
+ except KeyError:
+ pass
+ # now, read the complete index table, which is slower
self.itable = self.program.getTable(self.runner,
self.ittoc.getCDDBDiscId(),
- self.ittoc.getMusicBrainzDiscId(), self.device, self.options.offset)
+ self.ittoc.getMusicBrainzDiscId(), self.device, offset)
assert self.itable.getCDDBDiscId() == self.ittoc.getCDDBDiscId(), \
"full table's id %s differs from toc id %s" % ( |
So what's actually wrong with this fix? What would be a better way to do it? |
It feels "hackish": it doesn't follow the structure of the other code. |
Could you be more specific? :P How should this be implemented correctly? |
@PlasmaSheep My "solution" is just a slightly edited copy & paste from the Rip class of the same file. What's your opinion about this? |
You're more familiar with the code base I think, so if there's a nicer way to do it we can do that/ For now the ugly fix will serve, I think. |
https://what.cd/forums.php?action=viewthread&threadid=163034&postid=5702764#post5702764
The text was updated successfully, but these errors were encountered: