Commit Graph

66 Commits

Author SHA1 Message Date
JoeLametta
f79fb32340 Remove broken assertion 2019-02-02 19:19:50 +01:00
JoeLametta
cf923cc9cc Review existing comments and add new ones
Also clarified a statement
2019-02-02 19:19:50 +01:00
JoeLametta
ad66af900f Remove erroneous extra format argument 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
16b0d8dc29 Make methods static 2019-02-02 19:19:49 +01:00
JoeLametta
fef7973113 Modernize code for easier Python 3 port
- Replace print statement with function call
- Replace except ..., ...: syntax with except ... as ...:
- Simplify obsolete try ... except ... code block
- Replace some unicode calls with u-prefixed strings
- Do not use `len(SEQUENCE)` to determine if a sequence is empty
- Replace dictionary creation
- Drop support for GObject static bindings
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
3a569484e3 Discover plugins in system directories too
Fixes #135.
2018-12-14 22:16:13 +01:00
JoeLametta
c803a59d87 Fix whipper cd rip menu bug (loggers list) 2018-12-14 21:52:12 +01:00
JoeLametta
92cbb88f1f Avoid double showing the same error message 2018-12-14 14:21:56 +00: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
c377417108 Replace sys.std{out,err} statements with logger/print calls (#331)
* Change global default log level to 'INFO'

We're going to increase our usage of logger statements instead of print instructions (where deemed opportune).

* Replace sys.std{out,err} statements with logger/print calls

Fixes #303.
2018-12-13 20:21:26 +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
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
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
Joe
241f44eff6 Merge branch 'master' into python3 2018-06-08 14:32:27 +00:00
Joe
a320f6a0a5 Remove whipper's image retag feature (#269)
Fixes #262.
2018-05-24 17:19:14 +02:00
Andreas Oberritter
145403705d Switch to PyGObject by default (#271)
* 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
2018-05-24 17:11:37 +02:00
JoeLametta
f6d9f398b0 Exception.message removed in Python 3 2018-05-08 18:39:08 +02:00
JoeLametta
0f67bc4a96 Remove unneeded brackets in print statements 2018-05-08 18:39:08 +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
b6ac79f01e Wrap map() in a list call 2018-05-08 18:39:08 +02:00
JoeLametta
d3522940b2 Wrap existing range() calls with list 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
JoeLametta
db8050d8c4 Fix PEP-8 E128 2018-04-09 08:05:00 +00:00
JoeLametta
b5caf86cd2 Push whipper v0.7.0 release 2018-04-09 08:00:00 +00:00
Q3CPMA
19eb9741c7 command.cd: simple message while reading toc
Fixes #257.
2018-04-05 18:00:00 +00:00
Samantha Baldwin
574b8b2ea5 Remove debug commands, add mblookup command (#249)
* add mblookup command

* remove debug commands

* mblookup: replace sys.stdout.write with print

* minor formatting fixes
2018-03-22 14:27:18 +01:00
Samantha Baldwin
fd2c56053b read command parameters from config sections (#240)
* read command parameters from config sections

* README: update config file documentation

* README: config example type INI, add comma

* README: clearer and better spelled wording

* README: fix 'delineated' typo
2018-03-07 14:39:29 +01:00
Samantha Baldwin
09de58852e Revert "Convert docstrings to reStructuredText"
This reverts commit 3b1bd242d0.
2018-03-02 16:47:12 -05:00
Samantha Baldwin
44e160910c remove -T/--toc-pickle 2018-03-01 21:14:15 -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
Calum Chisholm
fe17e3b753 Fix appearance of template description text.
modified:   cd.py
2018-01-29 23:32:43 +08:00
Merlijn Wajer
6bd389b7b1 Fix resuming previous rips
Thanks to Freso for testing.

command/cd: Only call makedirs when dir does not exist
common/checksum: Support flac input files

Fixes #136
2018-01-26 23:16:41 +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
Eshan Singh
7d154a3cfe Refuse any url with a scheme or path 2018-01-05 17:51:57 +05:30
Eshan Singh
e2e8676e4d Enable connecting to a custom MusicBrainz server
Under the new [musicbrainz] section in the config,
you can set a server to connect to.

Closes #172.
2018-01-05 17:29:28 +05:30
Joe
1247c94e8c Merge pull request #195 from RecursiveForest/restore-flac-extension
restore .flac extension
2017-11-06 09:16:13 +01:00
LingMan
d97371dbc7 Fix recently introduced Python 3 incompatibility
Fixes d4aad57188
2017-09-30 02:52:11 +02:00
Samantha Baldwin
00169792d7 restore .flac extension 2017-09-19 14:27:28 -04:00
JoeLametta
a3e92606c5 Merge pull request #187 from RecursiveForest/rewrite-accuraterip
AccurateRip V2 support
2017-09-15 23:12:40 +02:00
Samantha Baldwin
d4aad57188 fix minor string handling minibugs 2017-09-15 16:10:22 -04:00
Samantha Baldwin
311084c4fd offset.py: handle accurip response not found 2017-09-10 22:47:08 -04:00
Samantha Baldwin
94b9a1bbf6 fix image verify:
- accurip.py: raise exception if accuraterip db entry not found
- program.py: verify image with only one table, remove redundant check
2017-09-10 22:35:10 -04:00
Samantha Baldwin
b98cc32fd0 program.py: correct m3u htoa handling 2017-09-10 21:53:08 -04:00