Added conditional to `program.write_m3u()` to
ignore skipped tracks.
Added skipped_tracks support to the `Program` and
`image.ImageVerifyTask` classes to avoid crashing
when a file for a skipped track doesn't exist.
Added conditional to `accurip.calculate_checksums`
to check if a path exists before trying to calculate
checksums, this prevents `accuraterip-checksum.c` from
emitting an error message (`sf_open failed!`) when a
path doesn't exist (as when a track is skipped).
Signed-off-by: blueblots <63152708+blueblots@users.noreply.github.com>
Whipper's caching implementation causes a few issues (#196, #230, [#321 (comment)](https://github.com/whipper-team/whipper/pull/321#issuecomment-437588821)) and complicates the code: it's better to drop this feature.
The rip resume feature doesn't work anymore: if possible it will be restored in the future.
* Remove caching item from TODO
* Delete unneeded files related to caching
* Update 'common/directory.py' & 'test/test_common_directory.py' (caching removal)
* Update 'common/accurip.py' & 'test/test_common_accurip.py' (caching removal)
* Update 'common/program.py' (caching removal)
* Update 'command/cd.py' (caching removal)
This fixes#335, fixes#196 and fixes#230.
Signed-off-by: JoeLametta <JoeLametta@users.noreply.github.com>
Added filter options:
- dot (replace leading dot with _)
- posix (replace illegal chars in *nix OSes with _)
- vfat (replace illegal chars in VFAT filesystems with _)
- whitespace (replace all whitespace chars with _)
- printable (replace all non printable ASCII chars with _)
Removed filter options:
- fat (replaced with vfat)
- special
Fixes#313.
Signed-off-by: JoeLametta <JoeLametta@users.noreply.github.com>
This simplifies choosing the correct release when there are multiple matches.
If a certain release has multiple countries associated, all will be shown.
Thanks to the user "the-confessor" for testing this new feature.
Fixes#451.
Signed-off-by: JoeLametta <JoeLametta@users.noreply.github.com>
If the directory used by tempfile.NamedTemporaryFile is on a different
filesystem (e.g. /tmp on tmpfs), `whipper cd rip --cover-art` will fail
with an error such as:
Traceback (most recent call last):
File "/usr/bin/whipper", line 11, in <module>
load_entry_point('whipper==0.9.0', 'console_scripts', 'whipper')()
File "/home/kevin/tmp/whipper/whipper/command/main.py", line 43, in main
ret = cmd.do()
File "/home/kevin/tmp/whipper/whipper/command/basecommand.py", line 139, in do
return self.cmd.do()
File "/home/kevin/tmp/whipper/whipper/command/basecommand.py", line 139, in do
return self.cmd.do()
File "/home/kevin/tmp/whipper/whipper/command/cd.py", line 191, in do
self.doCommand()
File "/home/kevin/tmp/whipper/whipper/command/cd.py", line 363, in doCommand
self.program.metadata.mbid)
File "/home/kevin/tmp/whipper/whipper/common/program.py", line 498, in getCoverArt
os.replace(f.name, cover_art_path)
OSError: [Errno 18] Invalid cross-device link: '/tmp/tmprmx4d9c9.cover.jpg' -> './Boston/Greatest Hits/cover.jpg'
due to calling os.replace with paths on different filesystems.
Instead of os.replace, use shutil.move, which falls back to shutil.copy2
if os.replace doesn't work.
Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
Add PERFORMER & COMPOSER metadata tags to audio tracks (if available).
Composer(s) and performer(s) will be extracted from MusicBrainz
recording metadata by new _getComposers and _getPerformers
functions then there will be new properties added to each track
metadata. If those data are present it will be tagged as new tags
PERFORMER and COMPOSER.
Signed-off-by: ABCbum <kimlong221002@gmail.com>
Co-authored-by: JoeLametta <JoeLametta@users.noreply.github.com>
Signed-off-by: JoeLametta <JoeLametta@users.noreply.github.com>
Add option `--cover-art` to `whipper cd rip` command which accepts three values:
- `file`: save the downloaded cover image as standalone file in the rip folder (named `cover.jpg`)
- `embed`: embed the download cover image into all the ripped audio tracks (no standalone file will be kept)
- `complete`: save standalone cover image as standalone file and embed it into all the ripped audio tracks (`file` + `embed`)
Every cover art is fetched from the Cover Art Archive as JPEG thumbnail with a maximum dimension of 500px.
Other supported values for the thumbnails are 250, 500 and 1200 (currently only some images have a corresponding 1200px sized thumbnail).
This feature introduces an optional dependency on the `Pillow` module which is required for the decoding of the cover file (required by the `embed` and `complete` option values).
Problem:
- EmbedPicTureTask shouldn't be a task.
Signed-off-by: ABCbum <kimlong221002@gmail.com>
Co-authored-by: JoeLametta <JoeLametta@users.noreply.github.com>
Signed-off-by: JoeLametta <JoeLametta@users.noreply.github.com>
- Removed unused code not portable due to buffer() use
- raw_input() does not exist in Python 3
- Fixed octal constant syntax for Python 3
- Fixed TypeError
- Replace if not exists: makedirs(path) with single call: using makedirs(path, exist_ok=True)
- Class inherits from object, can be safely removed from bases in python3: pylint's useless-object-inheritance (W0235) check
Signed-off-by: JoeLametta <JoeLametta@users.noreply.github.com>
For historical reasons there is some confusion between Tracks[1] and
Recordings[2] in MusicBrainz. Essentially what should be saved to
`MUSICBRAINZ_TRACKID` is the Recording MBID—which is what whipper is
correctly doing, but the value storing this value was called `mbidTrack`
rather than `mbidRecording`, which could potentially cause confusion.
[1] https://musicbrainz.org/doc/Track
[2] https://musicbrainz.org/doc/Recording
Signed-off-by: Frederik “Freso” S. Olesen <freso.dk@gmail.com>
In general, "albums" in everyday usage is what on MusicBrainz would be
considered a release group[1] while as far as I can tell, every single
instance of it being used in whipper is referring to a single "edition"
of an album, which is what would be called a "release" in
MusicBrainz terminology[2].
[1] https://musicbrainz.org/doc/Release_Group
[2] https://musicbrainz.org/doc/Release
Signed-off-by: Frederik “Freso” S. Olesen <freso.dk@gmail.com>
- Fix PEP8's line too long warning
- Remove useless parentheses
- Use triple quotes for docstring
- Address pylint's 'inconsistent-return-statements'
- Specify string format arguments as logging function parameters
- Comment out already disabled block of code
- Remove useless else (after return)
- Remove useless statement
- Do not import already imported module
* Begin work on moving cdrdao to a task
* Add code to start cdrdao task
* Allow cdrdao output to be asynchronously parsable
* Provide progress of cdrdao read toc/table to console
* Flake8 fixes, Freso's advices
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.
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).