Code Monkey home page Code Monkey logo

Comments (6)

JoeLametta avatar JoeLametta commented on August 22, 2024

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.

abendebury avatar abendebury commented on August 22, 2024

So what's actually wrong with this fix? What would be a better way to do it?

from whipper.

JoeLametta avatar JoeLametta commented on August 22, 2024

It feels "hackish": it doesn't follow the structure of the other code.

from whipper.

abendebury avatar abendebury commented on August 22, 2024

Could you be more specific? :P

How should this be implemented correctly?

from whipper.

JoeLametta avatar JoeLametta commented on August 22, 2024

@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.

abendebury avatar abendebury commented on August 22, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.