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.
* 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.
* 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.
* 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
This commit also includes:
- whitespace / code formatting fixes
- slight syntax related changes: except <exception_name>, e -> except <exception_name> as e
- 3 pointless instructions instances have been rewritten [sorted] (spotted by semi-automatic check)
The unrelated changes shouldn't have any real impact on whipper's behaviour.
- output path no longer has fallbacks
- refactor accuraterip cache
- use requests to download accuraterip entries
- add tests for accuraterip functionality
- remove gobject support from accuraterip-checksum calculation
- default track template now includes extension
- begin to remove support for continuing rip
- begin to use print instead of sys.stdout.write() throughout
os.path.split() only even splits into two components, which means that
path templates that have more than two parts (e.g., `%A/%d - %y/%X`)
will not get split properly for the purpose of added disambiguation
parts to them.
os.path.join() will still work fine to splice the split template back
together as it takes an arbitrary number of arguments.
Make MusicBrainz consistently written as "MusicBrainz" and not
"musicbrainz" or "Musicbrainz".
Doesn't change instances that refer to the Python module or similar.