Commit Graph

1072 Commits

Author SHA1 Message Date
Philipp Wolfer
866ef71dce Skip locale test if locales are not built, build locales in CI tests 2023-06-09 09:19:07 +02:00
Philipp Wolfer
79cbc53f4d i18n: basic tests for working locales 2023-06-09 08:59:16 +02:00
Laurent Monin
76154e0b78 Introduce WSRequest.has_auth and simplify _update_authorization_header
Add matching tests
2023-06-03 19:41:17 +02:00
Laurent Monin
bdd31ab5a4 Complete tests for WSRequest
- 100% coverage of the class
2023-06-03 17:08:18 +02:00
Laurent Monin
8d1e304fbe Add minimal testing for WSRequest 2023-06-03 15:05:12 +02:00
Laurent Monin
91a0618a48 qurl -> url, and convert to Qurl is passed as a string 2023-06-03 14:48:59 +02:00
Laurent Monin
8bb5457f4f Simplify tests, pass QUrl to WSRequest 2023-06-03 14:23:14 +02:00
Laurent Monin
3d6554a958 Replace assert with if / raise AssertionError
- check path & handler aren't None either
- use a generic dummy_handler method for tests
2023-06-03 11:06:29 +02:00
Laurent Monin
3d95051ecf Enforce keywords arguments only for WSRequest and drop WS*Request subclasses
- using only keyword arguments will ease future changes
- order of arguments do not matter anymore
- this class isn't used directly for now, I don't think any plugin uses it
- subclasses aren't strictly needed
- since methods have a lot of parameters, making them obvious is much easier to read
- we can pass a dict (**kwargs)
- note the use of * in __init__() enforcing keyword args only.
- use few asserts as safety for "mandatory" arguments
2023-06-02 22:44:49 +02:00
Laurent Monin
ee76bf9e51 Improve coverage of artist_to_metadata(), checking for ended/endarea/enddate
- drop redundant test
2023-06-02 15:47:16 +02:00
Laurent Monin
a962f9176e Improve coverage of media_formats_from_node() and medium_to_metadata()
- use a multi-media release (this case wasn't tested at all)
- fuse old and new tests
- drop media.json test file as it was only used there
2023-06-02 15:26:53 +02:00
Laurent Monin
2060e3bc82 Add tests for _relations_to_metadata_target_type_url()
- 100% coverage of this method
2023-06-02 11:40:00 +02:00
Laurent Monin
2ae3b54614 Basic tests for _parse_attributes() 2023-06-02 10:59:18 +02:00
Laurent Monin
c82ef8b0f1 Extensively test _locales_from_aliases()
- use a stripped down version of aliases (unused fields were removed)
- 100% coverage
- correctness of results has to be reviewed
2023-06-02 00:45:40 +02:00
Philipp Wolfer
26cf9b507e PICARD-711: Add support for series variables
Adds support for variables for release group, release, recording
and work series. The following variables are getting set:

- ~recording_series
- ~recording_series_id
- ~recording_seriescomment
- ~recording_seriesnumber
- ~release_series
- ~release_series_id
- ~release_seriescomment
- ~release_seriesnumber
- ~releasegroup_series
- ~releasegroup_series_id
- ~releasegroup_seriescomment
- ~releasegroup_seriesnumber
- ~work_series
- ~work_series_id
- ~work_seriescomment
- ~work_seriesnumber
2023-05-29 21:42:42 +02:00
Philipp Wolfer
b273b116ca PICARD-2616: Add tests for releasedate tag 2023-05-22 20:46:45 +02:00
Philipp Wolfer
0b823f2443 PICARD-2535: Strip trailing null chars for Vorbis / FLAC 2023-04-18 11:16:48 +02:00
Philipp Wolfer
03449e01d3 PICARD-2630: Fix potential crash on config upgrade 2023-04-18 10:43:10 +02:00
Philipp Wolfer
c5445cf2e2 PICARD-2609: Run file.update on priority_thread_pool 2023-01-12 19:29:15 +01:00
Philipp Wolfer
c513e71cf0 Implement a FakeThreadPool for testing
This runs the specified task directly instead of doing actual threading.
2023-01-12 19:29:15 +01:00
David Kellner
2055b05d9a PICARD-2606: Add writer and lyricist sort names as variables 2023-01-07 23:00:08 +01:00
Philipp Wolfer
75871991b8 PICARD-2595: Customizable replacement for directory separators 2022-12-06 09:37:45 +01:00
Philipp Wolfer
a8a7ac8a50 Merge pull request #2177 from phw/filenaming-compat-options
Extended compatibility options for file names
2022-12-05 17:45:11 +01:00
Philipp Wolfer
0b6c78e9fb Merge pull request #2173 from rdswift/sequential_command_processing
PICARD-2546: Sequential processing of executable commands
2022-12-05 17:42:29 +01:00
Philipp Wolfer
cb339c6a4a PICARD-356: Allow user defined replacements for Windows incompatible characters 2022-12-05 17:08:56 +01:00
Philipp Wolfer
95c736a13e PICARD-2553: Add option to use underscores instead of spaces in file naming
This collapses multiple whitespace characters and underscores in a filename into a single underscore
2022-12-04 18:07:42 +01:00
Philipp Wolfer
a65a078e3b Added test for default cover name with CoverArtImage._make_image_filename 2022-11-28 10:23:19 +01:00
Philipp Wolfer
de94e98fc8 Added test for relative paths with CoverArtImage._make_image_filename 2022-11-28 10:05:29 +01:00
Philipp Wolfer
c39c0cbb8d PICARD-2590: Fix saving cover art images with relative paths 2022-11-28 09:46:55 +01:00
Bob Swift
1847b4d068 Refactor to create new RemoteCommands class 2022-11-22 15:54:39 -07:00
Bob Swift
551043ceaf Process command line executable commands through a queue object.
- Implement a queue object to hold the executable command queue
- Implement a command processor thread to parse the command queue
- Implement command file tracking to avoid circular references
- Do not queue additional commands after a `QUIT` has been queued

Still required:

- Block new command execution until current command is complete
- Test for completion must include all sub threads created
2022-11-22 15:54:38 -07:00
Bob Swift
7d03fc714b Add test 2022-11-07 13:28:27 -07:00
Philipp Wolfer
508e81991c PICARD-2565: Apply make_short_filename and make_save_path to saved image files 2022-11-05 06:51:51 +01:00
Philipp Wolfer
76c2dff6b6 Fixed proper bitrate in WAVE tests
mutagen < 1.46 reports the wrong bitrate for WAVE files. Test the proper bitrate in this version, don't test the bitrate in earlier versions.
2022-10-10 12:08:10 +02:00
Philipp Wolfer
41026017c5 PICARD-2568: Fix $cleanmulti with hidden variables 2022-10-02 21:49:23 +02:00
Jeffrey Bosboom
069ffb190b Generate disc ID from fre:ac ripping log 2022-09-30 16:41:24 +02:00
Philipp Wolfer
752607400f PICARD-2554: Only do AcoustID submission for matched files
Ensure submission of fingerprint / recording ID pairs is only done for files matched. Kept the implementation flexible so we can also have other entities then tracks be able to have files attached with AcoustID submission enabled.
2022-09-29 17:36:11 +02:00
Philipp Wolfer
37cf4d245d Merge pull request #2151 from phw/PICARD-2550-dbpoweramp-logs
PICARD-2550: disc ID from dBpoweramp ripper logs
2022-09-25 15:27:54 +02:00
Philipp Wolfer
ff6d783d36 PICARD-2549: Fixed similarity not getting updated if only difference is cover art
If a file is moved to a track where the metadata matches perfectly but only cover art is different, then the similarity score of this file was not recalculated. That means the file retains the similarity of the previous (probably bad) match. Also only do this change if the state was NORMAL before (similar to the other state updates, ignoring states like PENDING and ERROR).
2022-09-25 15:24:15 +02:00
Laurent Monin
b12198189b Remove duplicated line in dict 2022-09-25 14:45:54 +02:00
Philipp Wolfer
bee8b569e3 Move detect_unicode_encoding function to picard.util
Extract the function from ripper log file handling and make it available in picard.util.
2022-09-25 12:14:51 +02:00
Philipp Wolfer
593728e616 PICARD-2550: disc ID lookup from dBpoweramp secure ripping log 2022-09-25 11:53:44 +02:00
Philipp Wolfer
ad97e5bf7d PICARD-2544: Use UUID for pipes in tests 2022-09-13 07:56:42 +02:00
Kamil
434e1f3d25 Added remote command: FROM_FILE
Remote commands can be read directly from a file (one per line).
Lines starting with `#` and empty lines are ignored.
2022-09-07 10:47:30 +02:00
Philipp Wolfer
224096df0b PICARD-2520: Null bytes in tag values can cause crashes when sorting
strxfrm fails if a string contains a null char. Sanizize the input strings for strxfrm by removing any null chars.
2022-08-19 13:31:21 +02:00
Philipp Wolfer
095e8b7615 Handle flake8=5.0 code style warnings 2022-07-31 13:34:43 +02:00
Laurent Monin
0416650642 ParseItemsToLoad: add __bool__() and use it to bring tagger to front 2022-07-27 10:33:44 +02:00
Laurent Monin
56b54a3a5d Tagger._parse_items_to_load() -> ParseItemsToLoad class 2022-07-24 21:44:54 +02:00
skelly37
5f6dda9de2 changes 2022-07-24 19:28:02 +02:00
skelly37
74581db170 test enhancements 2022-07-24 19:26:31 +02:00