Commit Graph

56 Commits

Author SHA1 Message Date
JoeLametta
4eeb0cddc7 Update failing AccurateRipResponse tests 2019-07-05 08:00:00 +00:00
Thomas Vander Stichele
7a4680f285 Add testcase for Gentlemen: same CDDB ID as Interpol
Signed-off-by: JoeLametta <JoeLametta@users.noreply.github.com>
2019-05-09 09:46:28 +02:00
Frederik “Freso” S. Olesen
bf8daf186d mbngs: Let releaseType be None if no type is set
Signed-off-by: Frederik “Freso” S. Olesen <freso.dk@gmail.com>
2019-05-03 02:49:42 +02:00
Frederik “Freso” S. Olesen
c2459067ce Test mblookup output when release type is missing
Signed-off-by: Frederik “Freso” S. Olesen <freso.dk@gmail.com>
2019-05-03 02:38:38 +02:00
Frederik “Freso” S. Olesen
8209927a79 Add testcase for failure when missing release type
See https://github.com/whipper-team/whipper/issues/396

Signed-off-by: Frederik “Freso” S. Olesen <freso.dk@gmail.com>
2019-05-02 18:35:42 +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
Frederik “Freso” S. Olesen
14aa8b7f7c Handle artist MBIDs as multivalue tags
Instead of joining artist MBIDs with a ';' save them as multiple values
to the tag. (This is how Picard saves that tag.)

Signed-off-by: Frederik “Freso” S. Olesen <freso.dk@gmail.com>
2019-02-13 22:59:58 +01:00
Frederik “Freso” S. Olesen
42e7a77645 Remove unused argument for ….mbngs._getMetadata()
Signed-off-by: Frederik “Freso” S. Olesen <freso.dk@gmail.com>
2019-02-13 22:07:59 +01:00
Frederik “Freso” S. Olesen
364f024c08 Add Work MBIDs to ripped files
See https://musicbrainz.org/doc/Work

Third and final and thus closes https://github.com/whipper-team/whipper/issues/200

Signed-off-by: Frederik “Freso” S. Olesen <freso.dk@gmail.com>
2019-02-13 21:01:57 +01:00
Frederik “Freso” S. Olesen
266a272e3c Add testcase to check all release and track metadata
Before this bits and pieces of release and track metadata would be
tested in the other test cases, but no test cases included all of them.

Signed-off-by: Frederik “Freso” S. Olesen <freso.dk@gmail.com>
2019-02-13 19:55:37 +01:00
Frederik “Freso” S. Olesen
c963b0173b Add Release Group MBIDs to ripped files
See https://musicbrainz.org/doc/Release_Group

Second part of https://github.com/whipper-team/whipper/issues/200

(MusicBrainz JSON test data dumps needed to be refreshed due to the
new `includes` in the MusicBrainz web service call.)

Signed-off-by: Frederik “Freso” S. Olesen <freso.dk@gmail.com>
2019-02-13 19:03:15 +01:00
Frederik “Freso” S. Olesen
41b1b1feff Add Track MBIDs to ripped files
See https://musicbrainz.org/doc/Track

First part of https://github.com/whipper-team/whipper/issues/200

Signed-off-by: Frederik “Freso” S. Olesen <freso.dk@gmail.com>
2019-02-13 18:59:11 +01:00
Frederik “Freso” S. Olesen
fce00f492e Change release used for testing [unknown] artist credits
The previously used release has since had its [unknown] artist credit
resolved since the data was originally taken from MusicBrainz.

Using data from this release now:
https://musicbrainz.org/release/8478d4da-0cda-4e46-ae8c-1eeacfa5cf37
Specifically:
https://musicbrainz.org/track/a04ee451-46c3-3ad6-a815-d7bb8449d605

Signed-off-by: Frederik “Freso” S. Olesen <freso.dk@gmail.com>
2019-02-13 18:35:48 +01:00
Frederik “Freso” S. Olesen
6d3f44ba96 Change release used for testing missing release date
The previous release has gotten a release date added since it was
originally dumped from MusicBrainz.

Signed-off-by: Frederik “Freso” S. Olesen <freso.dk@gmail.com>
2019-02-13 18:35:28 +01:00
Frederik “Freso” S. Olesen
a08bbeea6a Refresh MusicBrainz JSON dumps used for testing
Some of these dumps predate when MusicBrainz had (re)introduced track
MBIDs, so some tests for the code for issue #200 would fail since the
JSON dumps didn't contain those IDs.

Signed-off-by: Frederik “Freso” S. Olesen <freso.dk@gmail.com>
2019-02-13 16:47:01 +01:00
JoeLametta
cf923cc9cc Review existing comments and add new ones
Also clarified a statement
2019-02-02 19:19:50 +01:00
JoeLametta
16b0d8dc29 Make methods static 2019-02-02 19:19:49 +01:00
JoeLametta
af90c1c338 Fix unresolved reference 2019-02-02 19:19:49 +01:00
JoeLametta
5311727572 Avoid shadowing built-ins/variables 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
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
a011ca8d73 Update 'JoeLametta' to 'whipper-team' everywhere in repo 2018-11-02 08:00:00 +00:00
JoeLametta
bd81f80afa Make flake8 happy 2018-05-08 18:39:08 +02:00
JoeLametta
2b4140d300 Make Python code more idiomatic 2018-05-08 18:39:08 +02:00
JoeLametta
9a7511b952 Replace iterator's next() methods usage with the next() function 2018-05-08 18:39:08 +02:00
JoeLametta
c26d4e99e5 Convert octal literals into the new syntax 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
5f75d41c7b Replace deprecated unittest method names with the correct ones 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
Eshan Singh
7d154a3cfe Refuse any url with a scheme or path 2018-01-05 17:51:57 +05:30
Eshan Singh
04c25ca644 Add tests for get_musicbrainz_server 2018-01-05 17:51:49 +05:30
JoeLametta
a3e92606c5 Merge pull request #187 from RecursiveForest/rewrite-accuraterip
AccurateRip V2 support
2017-09-15 23:12:40 +02:00
gorgobacka
7ae27de32b Fix artist name (#156)
* Use artist-credit->name

Use artist-credit->name, if it exists. Otherwise use artist-credit->artist->name.

* Add test case

* Fix for PEP8

* transform comment to docstring

* reject 'recording artist name' in favour of 'release artist name'

* reject 'recording artist name' in favour of 'release artist name'
2017-09-14 22:25:28 +02: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
a72ae82f0d test_common_accurip: remove leftover line 2017-09-07 14:56:29 -04:00
Samantha Baldwin
83729ef7f3 deflake, remove morituri hack, more error handling 2017-09-04 21:55:05 -04:00
Samantha Baldwin
007dc0729e add Marduk - Hearse accuraterip db entry bin 2017-09-04 21:34:47 -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
af18471cba Fix failing unittest in systemd-nspawn
Fixes #157
Only test_common_directory.py is changed because the other unittest is working as expected (the failure isn't related to whipper).
2017-06-30 18:17:29 +02:00
Frederik “Freso” S. Olesen
a0c0ce7e47 Fix(/ignore) PEP8/flake8 errors 2017-06-01 02:31:03 +02:00
Frederik “Freso” S. Olesen
b0d047ded1 Add unittest for new Program.addDisambiguation() method 2017-05-31 23:33:07 +02:00
Frederik “Freso” S. Olesen
4512cd3919 Test that disambigation is added to templates without "%d" 2017-05-31 23:33:06 +02:00
Frederik “Freso” S. Olesen
f3e3748d75 Test that disambiguation is only added once 2017-05-31 23:33:06 +02:00
Frederik “Freso” S. Olesen
12e52da55d Add more template test cases to testDisambiguateOnRelease
Some of these might not occur in the wild, but we theoretically support
them at least, and making sure they work might catch other issues we
didn't think of yet.
2017-05-31 23:33:06 +02:00
Frederik “Freso” S. Olesen
846ee04a5f Add test case illustrating https://github.com/JoeLametta/whipper/issues/127 2017-05-31 23:31:15 +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