Whipper offset find needs a (remote) matching AccurateRip entry to perform its task and confirm the drive offset: if none is found, return early to prevent exception.
Fixes#208.
Commit 9c72ebccd3 introduced a bug: all template strings are validated against the disc template RegEx (which, for example, is wrong if we're testing the track template).
If the template string contains variables which aren't valid for whipper, raise ValueError exception listing all the included unrecognized variables.
I've also corrected the example template configuration lines in the README.
Fixes#279.
`os.pathconf()` expects a bytes object, but the path is stored as a
unicode object. Since there's no specified encoding, Python chokes when
trying to convert it to a bytes object. Explicitly encoding it as UTF-8
allows Python to change it to a bytes object smoothly.
Fixes https://github.com/whipper-team/whipper/issues/315
Now Docker adopters can use whipper trough Docker Hub's automatically built images.
Thanks to user "anarcat" for proposing and thoroughly explaining how to reach this goal.
Closes#301.
* Limit length of filenames
If whipper generated filenames are longer thant the maximum value supported by the filesystem, the I/O operations are going to fail.
With this commit filenames which may be too long are truncated to the maximum allowable length.
Fixes#197.
The values stored in variables _inARDatabase and _accuratelyRipped were double incremented when both AR v1 and AR V2 entries were present e/o matched, leading to a wrong calculation and potentially erroneous summary reporting.
After this fix, in case of double matches only one is counted against each track.
* handle FreeDB server errors gracefully
In my repeated tests, I ended up upsetting freedb.org, which started
issuing 502 errors. Those errors are not correctly caught by the
program which just crashes with a backtrace. Instead, we handle those
like any other API error, which can already be generated by
perform_lookup (but not handled).
The visible result for the user is that the CD is simply not found on
FreeDB, an acceptable compromise, in my opinion.
Closes: #206
* harmonize an error message with other warnings
... which are all capitalized.
it's better to install/build whipper at the end of the Dockerfile,
because it will allow us to cache costly operations like locale-gen
while rebuilding with new source changes.
* fix syntax error in Dockerfile
* fix Docker invocation
It makes no sense to pass the `-t` argument twice and we need to tell
Docker where to find the Dockerfile. Also, it makes sense to write the
config file in a standard location. In my tests, I also had to create
the directory by hand otherwise I got this error:
cdparanoia can defeat the audio cache on this drive.
Adding drive cache behaviour to configuration file.
Traceback (most recent call last):
File "/usr/local/bin/whipper", line 11, in <module>
load_entry_point('whipper==0.7.0', 'console_scripts', 'whipper')()
File "/usr/local/lib/python2.7/dist-packages/whipper-0.7.0-py2.7.egg/whipper/command/main.py", line 36, in main
ret = cmd.do()
File "/usr/local/lib/python2.7/dist-packages/whipper-0.7.0-py2.7.egg/whipper/command/basecommand.py", line 139, in do
return self.cmd.do()
File "/usr/local/lib/python2.7/dist-packages/whipper-0.7.0-py2.7.egg/whipper/command/basecommand.py", line 139, in do
return self.cmd.do()
File "/usr/local/lib/python2.7/dist-packages/whipper-0.7.0-py2.7.egg/whipper/command/drive.py", line 63, in do
info[0], info[1], info[2], t.defeatsCache)
File "/usr/local/lib/python2.7/dist-packages/whipper-0.7.0-py2.7.egg/whipper/common/config.py", line 115, in setDefeatsCache
section = self._findOrCreateDriveSection(vendor, model, release)
File "/usr/local/lib/python2.7/dist-packages/whipper-0.7.0-py2.7.egg/whipper/common/config.py", line 164, in _findOrCreateDriveSection
self.write()
File "/usr/local/lib/python2.7/dist-packages/whipper-0.7.0-py2.7.egg/whipper/common/config.py", line 58, in write
shutil.move(path, self._path)
File "/usr/lib/python2.7/shutil.py", line 316, in move
copy2(src, real_dst)
File "/usr/lib/python2.7/shutil.py", line 144, in copy2
copyfile(src, dst)
File "/usr/lib/python2.7/shutil.py", line 97, in copyfile
with open(dst, 'wb') as fdst:
IOError: [Errno 13] Permission denied: u'/home/worker/.config/whipper/whipper.conf'
* remove needless tag version
:latest is implicit so it's useless noise as well.
* Update README.md
* freedb: Import from python-audio-tools 660ee2c
License: GPL-2.0+
* freedb: Remove unused code and set client name to whipper.
The removed functions depend on other classes of python-audio-tools,
but aren't needed here.
* cddb-py: replace with newer freedb implementation
The last release of cddb-py was 15 years ago. The freedb code taken
from python-audio-tools speaks protocol version 6 (Unicode) and is
compatible to both Python 2 and 3.
* freedb: Don't allow the pedantic CI test to fail
* cd/offset: remove unused call to gobject.thread_init()
There are no threads involved.
* task: switch to PyGObject
Python-gobject-2 is deprecated.
* travis: update dependencies for PyGObject and GLib-2.0
* README: Add GObject Introspection