From bccdd800633ee6b4d817e4ee255d170e991a6897 Mon Sep 17 00:00:00 2001 From: JoeLametta Date: Wed, 13 Jan 2016 21:14:09 +0100 Subject: [PATCH] Fix rip cd info This is a temporary solution which solves the issue but, in the future, it should be improved. --- morituri/rip/cd.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/morituri/rip/cd.py b/morituri/rip/cd.py index 9b9b976..09b5803 100644 --- a/morituri/rip/cd.py +++ b/morituri/rip/cd.py @@ -113,11 +113,19 @@ class _CD(logcommand.LogCommand): self.program.ejectDevice(self.device) return -1 - # now, read the complete index table, which is slower + # Hackish 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" % (