Commit Graph

1317 Commits

Author SHA1 Message Date
JoeLametta
32cd902821 Merge pull request #323 from whipper-team/feature/issue-215-unicode-issues
Fix UnicodeEncodeError with non ASCII MusicBrainz's catalog numbers
2018-12-11 17:50:51 +00:00
JoeLametta
21f73d32a5 Merge pull request #341 from itismadness/patch-1
Avoid zero padding in logger track numbers
2018-11-29 22:18:17 +01:00
it is madness
25800e0d3f Avoid zero padding in logger track numbers
Fixes #340
2018-11-29 09:41:58 -05:00
JoeLametta
4a53ecba2c Avoid zero padding in logger track numbers
Fixes #340.
2018-11-29 08:00:00 +00:00
JoeLametta
4a91898292 Merge pull request #321 from whipper-team/feature/cdrdao-toc-preservation
Preserve ToC file generated by cdrdao
2018-11-19 12:02:16 +00:00
JoeLametta
c2af4459ef Preserve ToC file generated by cdrdao
Whipper uses cdrdao during its ripping process. With this commit it will now store cdrdao's generated tocfile in the ripping path.
Preserving the tocfile allows users to easily burn ripped discs having a non-compliant cue sheet.

Fixes #214.
2018-11-19 12:56:58 +01:00
JoeLametta
2b286be91c Update failing AccurateRipResponse tests (#334)
* Update failing AccurateRipResponse tests [1/2]

The failures seem to be caused by a remote metadata change (metadata from AccurateRip about a release ID changed) which means some of the asserts related to a specific release ID are failing. I've fixed this issue with two commits.
This is part 1: here I've updated the confidence values of two tracks making it agree with AccurateRip's remote.

* Update failing AccurateRipResponse tests [2/2]

This is part 2: here I've replaced the outdated AccurateRip bin file with a freshly downloaded one.
2018-11-17 09:05:34 +00:00
JoeLametta
688574a5d8 Add Probot apps to improve workflow (#329)
* Add Probot Stale app

* Add Probot Welcome app
2018-11-13 15:42:28 +00:00
JoeLametta
f1aaaec73a Merge pull request #328 from whipper-team/feature/issue-202-zerodivisionerror
Raise exception when cdparanoia can't read any frames
2018-11-09 21:52:40 +01:00
JoeLametta
c0637b1b92 Raise exception when cdparanoia can't read any frames
This commit effectively reverts #159. Whipper now raises an exception again but with a clearer textual description.

Closes #202.
2018-11-09 21:47:56 +01:00
JoeLametta
8cec4696d5 Merge pull request #327 from whipper-team/feature/issue-208-offset-find-exception
Prevent exception in offset find
2018-11-09 21:41:34 +01:00
JoeLametta
09c3e4771d Prevent exception in offset find
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.
2018-11-09 21:36:50 +01:00
JoeLametta
d7fd3fb507 Convert print statement to logger warning
Clarify the description of the error.
2018-11-09 08:00:00 +00:00
JoeLametta
1449911a6f Merge pull request #325 from whipper-team/feature/fix-template-validation-pr-322
Fix template validation error
2018-11-04 12:24:21 +01:00
JoeLametta
4f5b684ec7 Fix template validation error
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).
2018-11-04 12:17:44 +01:00
JoeLametta
f0fcae872d Write musicbrainz_discid tag when disc is unknown
Fixes #280.
2018-11-02 18:47:52 +01:00
JoeLametta
59d5fdb84a Fix UnicodeEncodeError with non ASCII MusicBrainz's catalog numbers
Fixes #215.
2018-11-02 17:29:12 +01:00
JoeLametta
9c72ebccd3 Merge pull request #322 from whipper-team/feature/issue-279-disc-template-keyerror
Raise exception if template has invalid variables
2018-11-02 15:11:27 +00:00
JoeLametta
69bac864ab Raise exception if template has invalid variables
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.
2018-11-02 08:05:00 +00:00
JoeLametta
a011ca8d73 Update 'JoeLametta' to 'whipper-team' everywhere in repo 2018-11-02 08:00:00 +00:00
JoeLametta
30785b8d1b Push whipper v0.7.2 release
🎃  🎃  🎃
2018-10-31 08:00:00 +00:00
JoeLametta
24a0dceb71 Capitalize whipper's team name in README 2018-10-31 08:00:00 +00:00
JoeLametta
833cdb5de7 Merge pull request #318 from Freso/add-metainfo-xml-file
Add AppStream metainfo.xml file
2018-10-29 14:24:05 +00:00
JoeLametta
540703e6d5 Merge branch 'master' into add-metainfo-xml-file 2018-10-29 14:20:16 +00:00
JoeLametta
996cfd7bca Merge pull request #319 from Freso/issue-315-fix-unicode-error-in-truncate_filename
Explicitly encode path as UTF-8 in truncate_filename()
2018-10-29 12:28:18 +00:00
Frederik “Freso” S. Olesen
5e8d9117dd Add developer_name to .metainfo.xml file
As per https://github.com/whipper-team/whipper/pull/318#issuecomment-433889475
2018-10-29 13:27:48 +01:00
Frederik “Freso” S. Olesen
0fff37c954 Explicitly encode path as UTF-8 in truncate_filename()
`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
2018-10-29 13:06:02 +01:00
Frederik “Freso” S. Olesen
43f3fbe818 Add initial AppStream metainfo.xml file
AppStream metainfo.xml files are used to provide "metadata necessary for
an application-centric view on package repositories." This is an initial
and somewhat basic one written from scratch for whipper.

See https://www.freedesktop.org/wiki/Distributions/AppStream/
and https://www.freedesktop.org/software/appstream/docs/
2018-10-28 17:55:28 +01:00
JoeLametta
f9cb126270 Update README's Docker part with Docker Hub info
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.
2018-10-27 19:56:26 +02:00
JoeLametta
e33876c734 Fix flake8 W605 warning 2018-10-27 08:30:00 +00:00
JoeLametta
d25b995e28 Push whipper v0.7.1 release 2018-10-23 08:30:00 +00:00
JoeLametta
97052322cf Merge pull request #310 from whipper-team/requirements
Add a requirements.txt file
2018-10-23 09:39:50 +02:00
JoeLametta
fd6611743b Amend previous commit
The comment included a typo and, using 'max' as variable name, I was accidentally shadowing Python's builtin 'max' function
2018-10-23 08:00:00 +00:00
JoeLametta
a6d2e122e3 Add a requirements.txt file
Fixes #221.
2018-10-23 08:00:00 +00:00
JoeLametta
02fd962094 Limit length of filenames (#311)
* 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.
2018-10-22 20:51:14 +02:00
JoeLametta
669b356daa Update README.md
Updated links from JoeLametta to whipper-team
2018-10-21 10:14:01 +02:00
JoeLametta
528b5a18e9 Update README.md
- Updated logger plugins information
- Updated links section (added Matrix)
2018-10-21 08:02:27 +00:00
JoeLametta
a1e6d6040b Fix AccurateRip summary reporting
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.
2018-10-17 12:00:00 +00:00
anarcat
021e621f84 Handle FreeDB server errors gracefully (#304)
* 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.
2018-10-06 17:13:27 +00:00
JoeLametta
8b5e8a66d6 Merge pull request #305 from anarcat/docker-order
Reorder Dockerfile for performance
2018-10-06 16:41:54 +00:00
Antoine Beaupré
dad3b6e379 reorder Dockerfile for performance
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.
2018-10-05 12:03:31 -04:00
anarcat
6d7e54f8b2 Fix Docker invocation (#300)
* 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
2018-10-03 15:43:58 +00:00
Thomas McWork
cfcbfd5623 Document Docker usage in the README (#297)
Document Docker usage in the README
2018-10-03 08:07:47 +00:00
JoeLametta
777b12934c Empty test commit 2018-09-25 08:00:00 +00:00
Thomas McWork
0a762e23b8 Add Dockerfile (#237)
* add dockerfile

* add cleanup and reduce produces layers

* switch to pycdio==0.21 + libcdio manual build

* use libcdio 2.0.0 and pycdio 2.0.0
2018-09-24 21:19:08 +00:00
Andreas Oberritter
542e071443 switch CDDB implementation to freedb.py from python-audio-tools (#276)
* 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
2018-06-08 14:40:56 +00:00
Joe
84fa7c0944 Merge pull request #268 from JoeLametta/python3
Incremental code modernization for (future) Python 3 port
2018-06-08 14:34:41 +00:00
Joe
241f44eff6 Merge branch 'master' into python3 2018-06-08 14:32:27 +00:00
Joe
5db7656ef8 Clarify pre-emphasis reporting implementation
Currently whipper only reports about the pre-emphasis flag value as stored in the TOC.

Related to #275.
2018-05-24 17:29:51 +02:00
Joe
a320f6a0a5 Remove whipper's image retag feature (#269)
Fixes #262.
2018-05-24 17:19:14 +02:00