Commit Graph

34 Commits

Author SHA1 Message Date
Andreas Oberritter
ab95715efc accuraterip-checksum: convert to python C extension
* calculate v1 and v2 checksums at once
* let libsndfile handle both WAV and FLAC

Signed-off-by: Andreas Oberritter <obi@saftware.de>
2019-09-09 20:37:50 +02:00
JoeLametta
69f8f39c49 Change documentation from epydoc to reStructuredText
Thanks to Freso for all the useful comments!

Signed-off-by: JoeLametta <JoeLametta@users.noreply.github.com>
2019-05-03 20:06:13 +02:00
JoeLametta
1ae6240e63 Remove useless "stopgap morituri-insanity compatibility layer"
Signed-off-by: JoeLametta <JoeLametta@users.noreply.github.com>
2019-03-29 13:34:39 +01:00
JoeLametta
cf923cc9cc Review existing comments and add new ones
Also clarified a statement
2019-02-02 19:19:50 +01:00
JoeLametta
6bb585e1a5 Replace if ... else ... with simpler statement 2019-02-02 19:19:49 +01:00
JoeLametta
e7bfc34c0e Rename 'throwaway' variables to single underscore
Also removed unused ones
2019-02-02 19:19:49 +01:00
JoeLametta
5311727572 Avoid shadowing built-ins/variables 2019-02-02 19:19:49 +01:00
JoeLametta
0e17b32740 Various stylistic fixes
- 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
2019-02-02 19:19:46 +01:00
JTL
3e79032b63 WIP: Refactor cdrdao toc/table functions into Task and provide progress output (#345)
* 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
2019-02-02 18:36:03 +01:00
JoeLametta
a4f654a3f3 Fix logger statements having multiple arguments
Some of the instructions have been rendered invalid during the conversion to logger statements...

Also performed various stylistic fixes
2018-12-14 14:21:56 +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
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
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
2b4140d300 Make Python code more idiomatic 2018-05-08 18:39:08 +02:00
JoeLametta
a484815106 Fix dictionary iteration methods 2018-05-08 18:39:08 +02:00
JoeLametta
4280dbfafc Convert except X, T to except X as T 2018-05-08 18:39:08 +02:00
JoeLametta
44ece38740 In Python 3 print is a function 2018-05-08 18:39:08 +02:00
Samantha Baldwin
09de58852e Revert "Convert docstrings to reStructuredText"
This reverts commit 3b1bd242d0.
2018-03-02 16:47:12 -05:00
JoeLametta
00bf17082e Test HTOA peak value against 0 (integer comparison)
Now whipper uses the absolute value of SoX's peak level as internal peak value.

Fixes #143.
2018-02-01 15:14:42 +01:00
Merlijn Wajer
5dbb197681 Switch to libcdio-cdparanoia (from cdparanoia) (#213)
* Switch to libcdio-cdparanoia (from cdparanoia)

Next commits will add a choice to fall back to the old one, or pick a
different name. But let's get this ready for testing now.

* Add libcdio-utils to .travis.yml

* Parse libcdio-paranoia version instead of cdparanoia

* Remove useless digit checking test
2018-01-26 09:01:01 +01:00
JoeLametta
3b1bd242d0 Convert docstrings to reStructuredText
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.
2018-01-12 11:42:24 +01:00
Samantha Baldwin
83729ef7f3 deflake, remove morituri hack, more error handling 2017-09-04 21:55:05 -04:00
Samantha Baldwin
bfa0308880 AccurateRip V2 support
- 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
2017-09-04 21:26:34 -04:00
JoeLametta
3f248bfc00 Merge pull request #159 from sqozz/devision_zero
Fix division by zero
2017-08-02 10:26:20 +02:00
Sqozz
e84361b653 Fix division by zero 2017-07-28 18:27:42 +02:00
gorgobacka
4b3d462b16 Detect and handle CD-R discs (#154)
* Use cdrdao to detect CD-Rs and continue ripping only if the argument --cdr is passed.

* Get and display disc format from MusicBrainz.

* Add info about CD-R detection to logger

* Remove Musicbrainz medium format info

* add cdrdao command to logger

* Fix for PEP8

* Fix line break
2017-06-06 11:12:00 +02:00
JoeLametta
b6fb7e8a86 Solve all flake8 warnings (#163)
Whipper is now fully PEP8 compliant.
Revised version which includes all the changes suggested by Freso.
2017-05-31 23:09:36 +02:00
Frederik “Freso” S. Olesen
b4539d1f80 Change "THOMAS" print statement to logger.debug() call
I left the "THOMAS" part in for now, but this seems more like a debug
message than a user facing message to me—but it was also obviously
something @thomasvs left in for himself, so maybe the whole if clause
has no reason to still be there and should just get removed.
2017-05-19 19:07:16 +02:00
Frederik “Freso” S. Olesen
52731e97c0 Remove old, commented out code
Some of this seems to be debug code which has been left in, some of it
seems to just be old code that was commented out and never put back in
and probably just forgotten about. Either way, we use git for a reason,
so there's no need for these code snippets to stick around. The code
history can be inspected and old code retrieved that way.
2017-05-19 19:05:11 +02:00
Frederik “Freso” S. Olesen
6be899632d Fix flake8 whitespace warnings.
Guided by the output of `flake8 --select=W`.
2017-04-28 13:47:11 +02:00
Frederik “Freso” S. Olesen
a20c25258d Remove "Morituri - for those about to RIP" lines. 2017-04-26 23:08:50 +02:00
Frederik “Freso” S. Olesen
c719d9c077 Update filenames.
Note that the (internal) file names of
"whipper/test/cache/result/fe105a11.pickle" did not get updated, since
that breaks the tests for some reason.
2017-04-26 23:08:50 +02:00
Frederik “Freso” S. Olesen
cb0042c832 Update morituri references in inline documentation. 2017-04-26 23:08:50 +02:00
Frederik “Freso” S. Olesen
ff309e468c Rename "morituri" module to "whipper".
Fixes https://github.com/JoeLametta/whipper/issues/100
2017-04-26 23:08:28 +02:00