Laurent Monin
5395cbfc3d
MBAPIHelper: introduce _make_inc_arg() to build inc parameter value
...
- it produces a more stable output (elements are sorted)
- it gets rid of empty elements (preventing a++b case)
- it accepts any iterable
- add a test for it
I also removed 2 useless conversion to tuple() (it can use a set() anyway)
2023-06-09 08:50:34 +02:00
Laurent Monin
58f6b8dc7b
Get rid of APIHelper path list, just pass the path string to append
2023-06-08 16:44:15 +02:00
Laurent Monin
efde79a5e1
API Helpers: use unencoded_queryargs
2023-06-08 16:44:15 +02:00
Philipp Wolfer
c7acf9ea5b
Use base_url in APIHelper instead of separate url and base_path properties
2023-06-08 16:44:15 +02:00
Philipp Wolfer
c40f10a04f
Simplify album and track similarity search
...
Reuse existing search functonality, de-duplicate code.
2022-05-01 14:34:49 +02:00
Laurent Monin
2f6479747d
Update headers
2022-02-07 09:41:57 +01:00
Philipp Wolfer
1464838fc0
PICARD-2396: Add AcoustID Submission.get_args
2022-01-22 17:10:12 +01:00
Philipp Wolfer
574e7a90c1
PICARD-2396: Submit metadata to AcoustID on duration mismatch
...
If a file's duration does clearly not match the MB recording duration allow AcoustID submission anyway. But instead of submitting the recording MBID submit only the metadata.
This prevents clear mismatches while still allowing fingerprint submission. The submitted metadata can give a hint on the recording.
2022-01-22 17:10:11 +01:00
Philipp Wolfer
11d71bcc8c
PICARD-2396: Don't submit AcoustID on large duration difference
...
If the difference between the file's and the recording's duration exceeds a threshold, do not submit this pair to AcoustID.
2022-01-20 22:55:15 +01:00
Philipp Wolfer
1e9c61fcfb
Ensure rating submission XML is valid
...
Properly encode provided data
2022-01-02 17:29:34 +01:00
Laurent Monin
728b110bac
Get rid of _static_encode_acoustid_args()
...
- modify _encode_acoustid_args() accordingly
- modify tests to reflect changes
2021-12-28 19:23:04 +01:00
Laurent Monin
c6044fbdf5
Rework AcoustIdAPIHelper and add few tests
2021-12-28 15:10:00 +01:00
Laurent Monin
6ac0501f55
Simplify & test MBAPIHelper._collection_request()
...
- add batch size as parameter
- use range() step and do not modify passed releases argument
- add test
2021-12-27 17:33:46 +01:00
Laurent Monin
f14922ccc4
Move part of code to _xml_ratings() and test it
2021-12-27 11:50:52 +01:00
Laurent Monin
14ce07756e
Update Copyright headers, with the help of fix-headers.py script
2021-11-10 21:38:54 +01:00
Philipp Wolfer
c0e6243a13
PICARD-1926: Adjust test cases for new config structure
2020-12-25 12:37:15 +01:00
Laurent Monin
6b5e852a60
Run fix-header on *.py
2020-02-24 10:25:09 +01:00
Philipp Wolfer
dd4da2aa47
Updated isort config to put test imports in separate section
2019-04-04 08:32:22 +02:00
Wieland Hoffmann
e624aa121c
Make PicardTestCase the parent class of all tests
...
This brings the faketagger and, more importantly, settings reset to all of them.
2018-10-23 17:32:50 +02:00
Laurent Monin
5329e3592a
Clean up and sort imports using isort
...
Add a config for isort (https://github.com/timothycrosley/isort )
Run isort -rc . and make import style consistent across files
Add a note about `isort` in CONTRIBUTING.md
2018-08-22 08:51:25 +02:00
Sambhav Kothari
0f7c066211
Add API helper tests
2017-07-23 17:17:21 +05:30