Commit Graph

8791 Commits

Author SHA1 Message Date
Bob Swift
d0f512f79f Additional tests to ensure that changes don't break other functions 2022-01-07 09:30:58 -07:00
Bob Swift
49c6c0f2ec Remove underscore from clean_multi for consistency with other functions 2022-01-07 08:56:45 -07:00
Bob Swift
63fa1633f1 Allow empty strings in multi-value variables
- Keep empty strings in multi-value lists
- Add scripting function to remove empty strings from multi-value
- Update tests
2022-01-06 10:43:47 -07:00
Philipp Wolfer
4893e3d899 Merge pull request #2028 from zas/oauth_tidyup
Oauth code tidy up
2022-01-06 16:24:12 +01:00
Laurent Monin
53ec0e066f Add test for = encoding
Suggested by phw
2022-01-06 16:07:50 +01:00
Laurent Monin
8b787482ff _query_data(): Use urllib.parse.urlencode() instead of QUrl/QUrlQuery
Note: previously spaces weren't encoded, with this change they are (as plus) which is more conform to expected format for application/x-www-form-urlencoded
Actually this was a bug in previous version, as addQueryItem() didn't encode spaces as they should
See https://doc.qt.io/qt-5/qurlquery.html#addQueryItem
"This method does not treat spaces (ASCII 0x20) and plus ("+") signs as the same, like HTML forms do. If you need spaces to be represented as plus signs, use actual plus signs."

It wasn't an issue because none of passed data should contain spaces in our current code
2022-01-06 14:41:09 +01:00
Philipp Wolfer
8b8ab160b3 Removed obsolete comment from picard.spec 2022-01-06 14:16:42 +01:00
Laurent Monin
d1de2a7208 _query_data(): skip empty key and add a test 2022-01-06 14:16:11 +01:00
Laurent Monin
bdb3d91901 Introduce helper method _http_code() and shorten lines 2022-01-06 11:56:08 +01:00
Laurent Monin
870585e6b1 Re-indent code 2022-01-06 11:55:38 +01:00
Laurent Monin
a70728f4c3 Re-indent code 2022-01-06 11:55:21 +01:00
Laurent Monin
f73956fe89 OAuth: introduce _query_data() and reduce code redundancy 2022-01-06 11:47:36 +01:00
Laurent Monin
d5a666031f Move part of mb_login() code to new _mb_login_dialog() 2022-01-06 11:47:11 +01:00
Laurent Monin
e6347a3eec Merge pull request #2027 from phw/PICARD-2390
PICARD-2390: Fixed display of "default listening port" label
2022-01-06 10:50:59 +01:00
Philipp Wolfer
b1799738bf Bump copyright year 2022-01-06 10:31:04 +01:00
Philipp Wolfer
461db8650a PICARD-2390: Fixed display of "default listening port" label
With some localization and with UI scaling the label was only partially visible
2022-01-06 08:28:44 +01:00
Philipp Wolfer
5abe79ee94 PICARD-2389: Fix setting locale from UI language on Windows 2022-01-05 20:47:40 +01:00
Philipp Wolfer
3a45466223 PICARD-2386: Fix sorting of characters with diacritics
Columns in main list which were not using natural sorting had all characters with diacritics sorted after Z. Use locale.strxfrm for locale aware sorting instead.
2022-01-05 20:46:14 +01:00
Philipp Wolfer
690f1545c8 Merge pull request #2024 from zas/plugin_dirs
Generate plugin directories, simplify code
2022-01-05 17:48:02 +01:00
Laurent Monin
3148dc65f4 Move code to new generator plugin_dirs() 2022-01-05 15:30:35 +01:00
Laurent Monin
9dca67e267 Reduce code redudancy, introducing plugin_dirs list and a loop 2022-01-05 15:28:57 +01:00
Laurent Monin
845c1abd26 Reduce code redundancy, introducing toppath 2022-01-05 15:27:03 +01:00
Laurent Monin
29160804c0 Reduce code redundancy, introducing topdir 2022-01-05 15:25:47 +01:00
Laurent Monin
67ca5d6409 Reduce code redundancy 2022-01-05 15:23:43 +01:00
Philipp Wolfer
162cda5549 PICARD-2388: Support .m4r file extension for iTunes Ringtone files 2022-01-05 08:28:18 +01:00
Laurent Monin
87fe3c0024 Merge pull request #2022 from zas/split_album_finalize_loading
Album._finalize_loading(): split in smaller methods
2022-01-04 17:19:21 +01:00
Laurent Monin
978a6bf83c Album._finalize_loading(): split in smaller methods
- move parts of the code to new `_finalize_loading_album()` and `_load_tracks()`
- re-order code a bit: move `_finalize_loading_track()` above `_load_tracks()` (where it is used)
- reduce code indentation
2022-01-04 15:38:02 +01:00
Laurent Monin
e7e52f18c1 Merge pull request #2021 from zas/file_info_tags
Move FILE_INFO_TAGS to File class and reduce code redundancy
2022-01-04 12:18:28 +01:00
Laurent Monin
820551d513 Move FILE_INFO_TAGS to File class and reduce code redundancy
- add a test for File._copy_file_info_tags()
2022-01-04 12:00:19 +01:00
Philipp Wolfer
decc02312b Ignore bandit quoteattr warning 2022-01-02 17:29:34 +01:00
Philipp Wolfer
1e9c61fcfb Ensure rating submission XML is valid
Properly encode provided data
2022-01-02 17:29:34 +01:00
Philipp Wolfer
95f8e14586 Merge pull request #2018 from zas/submit_acoustid_tests
Rework AcoustIdAPIHelper and add few tests
2021-12-31 12:32:05 +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
e219435784 Merge pull request #2016 from zas/api_ratings
Test mb api ratings xml
2021-12-27 14:31:01 +01:00
Laurent Monin
ba7c9bca85 _xml_ratings(): minor simplification 2021-12-27 11:55:13 +01:00
Laurent Monin
f14922ccc4 Move part of code to _xml_ratings() and test it 2021-12-27 11:50:52 +01:00
Philipp Wolfer
7b9bec2dd8 Fix set_genre_inc_params accepting config object 2021-12-26 12:32:42 +01:00
Laurent Monin
416a55dbc0 Use set+tuple for inc, and tuple for path_list, instead of lists 2021-12-26 12:20:17 +01:00
Philipp Wolfer
197efffec1 packaging: Verify SHA256 hashes of downloaded Windows dependencies 2021-12-25 17:37:54 +01:00
Philipp Wolfer
42508ec5d3 Enclose command parameters in quotation marks 2021-12-24 14:15:17 +01:00
Philipp Wolfer
471065964c packaging: verify checksums for macOS downloaded dependencies 2021-12-24 12:30:06 +01:00
Philipp Wolfer
de2c3492ee PICARD-2378: Ensure AB submission submits only base filename 2021-12-23 11:52:33 +01:00
Philipp Wolfer
eee00317ee PICARD-2374: Remove rate limit for archive.org
Also moved setting the limit to the CAA implementation
2021-12-22 17:52:36 +01:00
Philipp Wolfer
1bab2cbc86 PICARD-2377: Fix potential crash on emptydirs initialization
If one of the QStandardPaths pointed to a no longer available location Picard would crash on startup
2021-12-22 17:49:24 +01:00
Philipp Wolfer
788db60781 PICARD-2375: Fix progress indicator staying at 0% for pending network requests 2021-12-22 17:47:58 +01:00
Philipp Wolfer
1ce255bd4f Update picard.pot 2021-12-22 12:24:52 +01:00
Bob Swift
9d5597f9ff Make $slice() 'end' parameter optional 2021-12-22 12:23:27 +01:00
Philipp Wolfer
a9be2c5fd7 Release 2.7.1 2021-12-21 11:32:56 +01:00