Comments (6)
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" % (
from whipper.
So what's actually wrong with this fix? What would be a better way to do it?
from whipper.
It feels "hackish": it doesn't follow the structure of the other code.
from whipper.
Could you be more specific? :P
How should this be implemented correctly?
from whipper.
@PlasmaSheep My "solution" is just a slightly edited copy & paste from the Rip class of the same file.
I'm not sure about it but maybe a better solution would be to implement it through the consolidated addOptions
and handleOptions
functions.
In the meantime I've committed the ugly fix to the master branch.
What's your opinion about this?
from whipper.
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.
from whipper.
Related Issues (20)
- File names vary in language and do not match track names HOT 2
- ripping fails due to bad character range HOT 4
- Don't add "Unknown Title/Artist/Album" tags HOT 1
- whipper completely stops when one track is faulty HOT 3
- Possible improvements in accurip subcommand HOT 1
- Burst mode rip all track and only do secure rip if AccurateRip check fails HOT 3
- whipper cd rip Fails with OSError: [Errno 36] File name too long
- submitting to accurip database HOT 3
- [Question] features track template scheme HOT 1
- Add new template variables for multi-disc sets HOT 3
- Preserve cdparanoia extraction bar in output log
- Detection of completed rip directory should occur immediately after release selection
- Release selection listing needs all catalog numbers listed for releases with multiple
- Release selection default sometimes not the first selection
- Command line flags need a way to negate/flip behavior
- Add ability to rip just particular tracks from a CD
- Read/Verify cycle is inefficient and should be improved
- offset find should allow specifying which track to test
- Rip of particular disc causes generation of corrupt .cue file and crash
- TOCError: Disc too long HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from whipper.