Skip to content
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

Switch to libcdio-cdparanoia (from cdparanoia) #213

Merged
merged 4 commits into from Jan 26, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Expand Up @@ -10,7 +10,7 @@ install:
# Dependencies
- sudo apt-get -qq update
- sudo pip install --upgrade -qq pip
- sudo apt-get -qq install cdparanoia cdrdao flac libcdio-dev libiso9660-dev libsndfile1-dev python-cddb python-gobject python-musicbrainzngs python-mutagen python-setuptools sox swig
- sudo apt-get -qq install cdparanoia cdrdao flac libcdio-dev libiso9660-dev libsndfile1-dev python-cddb python-gobject python-musicbrainzngs python-mutagen python-setuptools sox swig libcdio-utils
- sudo pip install pycdio requests

# Testing dependencies
Expand Down
16 changes: 8 additions & 8 deletions whipper/program/cdparanoia.py
Expand Up @@ -295,10 +295,10 @@ def start(self, runner):

bufsize = 1024
if self._overread:
argv = ["cdparanoia", "--stderr-progress",
argv = ["cd-paranoia", "--stderr-progress",
"--sample-offset=%d" % self._offset, "--force-overread", ]
else:
argv = ["cdparanoia", "--stderr-progress",
argv = ["cd-paranoia", "--stderr-progress",
"--sample-offset=%d" % self._offset, ]
if self._device:
argv.extend(["--force-cdrom-device", self._device, ])
Expand All @@ -317,7 +317,7 @@ def start(self, runner):
except OSError as e:
import errno
if e.errno == errno.ENOENT:
raise common.MissingDependencyException('cdparanoia')
raise common.MissingDependencyException('cd-paranoia')

raise

Expand Down Expand Up @@ -575,12 +575,12 @@ def stop(self):


_VERSION_RE = re.compile(
"^cdparanoia (?P<version>.+) release (?P<release>.+) \(.*\)")
"^cdparanoia (?P<version>.+) release (?P<release>.+)")


def getCdParanoiaVersion():
getter = common.VersionGetter('cdparanoia',
["cdparanoia", "-V"],
getter = common.VersionGetter('cd-paranoia',
["cd-paranoia", "-V"],
_VERSION_RE,
"%(version)s %(release)s")

Expand All @@ -605,12 +605,12 @@ class AnalyzeTask(ctask.PopenTask):
def __init__(self, device=None):
# cdparanoia -A *always* writes cdparanoia.log
self.cwd = tempfile.mkdtemp(suffix='.whipper.cache')
self.command = ['cdparanoia', '-A']
self.command = ['cd-paranoia', '-A']
if device:
self.command += ['-d', device]

def commandMissing(self):
raise common.MissingDependencyException('cdparanoia')
raise common.MissingDependencyException('cd-paranoia')

def readbyteserr(self, bytes):
self._output.append(bytes)
Expand Down
3 changes: 0 additions & 3 deletions whipper/test/test_program_cdparanoia.py
Expand Up @@ -68,9 +68,6 @@ class VersionTestCase(common.TestCase):
def testGetVersion(self):
v = cdparanoia.getCdParanoiaVersion()
self.failUnless(v)
# of the form III 10.2
# make sure it ends with a digit
self.failUnless(int(v[-1]), v)


class AnalyzeFileTask(cdparanoia.AnalyzeTask):
Expand Down