Philipp Wolfer
2ea94a4d21
cdrom: Always test generic implementation
2021-11-11 09:13:09 +01:00
Philipp Wolfer
5e4cac7184
Add generic tests for util.cdrom
2021-11-11 09:12:29 +01:00
Philipp Wolfer
5a292078b7
Refactor cdrom device reading on Linux
...
Simplify code, add tests, get rid of Qt dependency
2021-11-11 09:12:22 +01:00
Laurent Monin
14ce07756e
Update Copyright headers, with the help of fix-headers.py script
2021-11-10 21:38:54 +01:00
Laurent Monin
5b396ea766
Move part of File.update() code to a new generator File._tags_to_update()
...
- test it separately
- override File.supports_tag() for all tests, it ensures consistency
2021-11-10 18:06:01 +01:00
Laurent Monin
ca6cee6096
Simplify tests
2021-11-10 16:03:46 +01:00
Laurent Monin
da5fabc63f
Also test with initial default state File.PENDING where it makes sense
2021-11-10 12:47:53 +01:00
Laurent Monin
9d5d0fd01e
File.update(): add tests, 100% coverage
...
pytest --verbose --cov=picard --cov-report html test/test_file.py -k "FileUpdateTest"
2021-11-10 11:38:55 +01:00
Philipp Wolfer
49931a136e
Renamed mock classes in test_log
...
Avoids warnings by pytest trying to interpret these classes as test fixtures.
2021-11-10 08:08:50 +01:00
Philipp Wolfer
a01f28d0c0
PICARD-2327: Detect hidden files on macOS
2021-11-10 08:02:50 +01:00
Philipp Wolfer
5de0efc025
Merge pull request #1940 from zas/file_move_rename
...
Rework additional files methods
2021-11-10 08:02:28 +01:00
Laurent Monin
54ba988666
Test _get_additional_files_moves()
2021-11-09 23:15:23 +01:00
Laurent Monin
32032de3c2
Move settings from module level to class level, as it is only used there
2021-11-09 22:32:28 +01:00
Laurent Monin
0651a7c34b
Simplify test_filesystem
...
- try to make it a bit more readable
- move prepare_files() outside test class, so it can easily be re-used
- use name of files directly
- split files dict in two: src & dst
2021-11-09 22:27:13 +01:00
Laurent Monin
93a8d83365
Make _compile_move_additional_files_pattern() a static method and simplify tests
...
- do not pass config but the patterns string
- make it a static method (it doesn't need self anyway)
- simplify tests accordingly
2021-11-09 21:43:40 +01:00
Philipp Wolfer
10caa13975
Add Windows specific unit test for util.is_hidden
2021-11-09 20:58:17 +01:00
Laurent Monin
37982bed94
Also test weird whitespacing, multiple or newlines
2021-11-09 17:42:48 +01:00
Laurent Monin
baba955cf0
Since the pattern matching is case-insensitive, lowercase pattern string
...
- it helps to remove duplicates (like cover.jpg cover.JPG)
- fix test accordingly
2021-11-09 17:27:15 +01:00
Laurent Monin
21c5722f5a
Add tests for File._compile_move_additional_files_pattern()
2021-11-09 13:18:27 +01:00
Philipp Wolfer
a66b2ad779
PICARD-2324: Run .wvc rename code only if rename_files or move_files are set
2021-11-09 11:02:34 +01:00
Philipp Wolfer
d8406b5159
PICARD-2324: Move .wvc files before moving additional files
2021-11-09 11:02:34 +01:00
Philipp Wolfer
7cab070f74
PICARD-2324: Fix renaming of WavPack correction files
2021-11-09 08:51:25 +01:00
Philipp Wolfer
1686b7eb9c
imagelist.add_metadata_images must return False on empty image list
2021-11-07 15:01:18 +01:00
Philipp Wolfer
dbc236c48b
Optimize imagelist.add_metadata_images
...
Only update image list if new images are not already in the existing images. Also return bool value as indicated in the function documentation.
2021-11-07 15:01:18 +01:00
Philipp Wolfer
dd80c1d078
Use set comprehension where appropriate
2021-11-07 10:08:14 +01:00
Philipp Wolfer
aed015c657
Use sets in apev2 tests
2021-10-31 15:29:32 +01:00
Philipp Wolfer
cb6973cf44
Use sets instead of lists in conditionals
2021-10-31 10:17:23 +01:00
Philipp Wolfer
72f7d0ed18
Use sets for format unsupported tags
2021-10-31 09:56:14 +01:00
Laurent Monin
7c133891bd
Merge pull request #1933 from phw/PICARD-2314-fix-mp4-freetext-length
...
PICARD-2314: Fix ~length getting written to MP4 ----:com.apple.iTunes:~length
2021-10-31 09:43:59 +01:00
Philipp Wolfer
d5f131da04
PICARD-2307: Fix ValueError for Vorbis when deleting invalid tags
2021-10-29 18:13:47 +02:00
Philipp Wolfer
7a37e25152
vorbis: empty string is not a valid Vorbis comment key
2021-10-29 18:13:47 +02:00
Philipp Wolfer
8154af24c9
PICARD-2311: Preserve ID3 APIC types for loaded images
2021-10-29 18:13:16 +02:00
Philipp Wolfer
b7179d36fc
Move ID3 image type functions to picard.coverart.utils
2021-10-29 18:13:16 +02:00
Philipp Wolfer
a7f0a27f92
Exclude technical variables like ~length from format supported tags
...
Those values are taken from technical format information and are not part of the tags. This also fixes ~length getting written to MP4 (PICARD-2314).
2021-10-29 00:11:02 +02:00
Philipp Wolfer
cd559a1011
Extend wildcard to regex syntax with [...] set matching
2021-10-14 22:58:04 +02:00
Philipp Wolfer
f20da2d9aa
Extend wildcard to regex syntax with ? and escape character
2021-10-14 22:58:03 +02:00
Philipp Wolfer
7fabde2edf
PICARD-2288: Add a variable ~workcomment for the work disambiguation
2021-10-07 14:38:59 +02:00
Philipp Wolfer
c059631723
Add Id3Encoding enum
2021-10-04 10:46:57 +02:00
Philipp Wolfer
f5f03a1f00
PICARD-2199: Fix saving ratings to ID3 with non-latin1 characters in email
2021-10-04 08:53:52 +02:00
Laurent Monin
f5292e8eb4
Merge pull request #1908 from phw/PICARD-2236
...
PICARD-2236: Fullwidth slash is treated as directory separator
2021-09-26 16:05:08 +02:00
Philipp Wolfer
f53a35eee6
PICARD-2189: Add appdirs module to fix getting proper cache location
...
The cache location previously was wrong because it was created before app and org name had been set. The new module fixes this and allows more flexible replacement of the implementation.
2021-09-26 11:43:42 +02:00
Philipp Wolfer
d509dd83a0
PICARD-2236: Fullwidth slash is treated as directory separator
...
A full width slash U+FF0F, e.g. in イニシエノウタ/デボル, in combination with replace non-ascii gets turned into an ASCII slash, leading to a directory being created.
2021-09-26 11:36:57 +02:00
Laurent Monin
a213b5e4ea
Fix tests
2021-09-16 10:38:21 +02:00
Philipp Wolfer
192db0a729
PICARD-2233: Composer "credited as" must not overwrite composersort
...
If "credited as" is set on a composer relationship, the credited name gets used both for composer and composersort. This is inconsistent with how target credits get used for artist / artistsort and causes a composersort tag without proper sort name.
2021-09-12 19:40:49 +02:00
Bob Swift
8a4082fee7
Revise artist name translation logic. Add tests.
2021-09-09 12:34:34 -06:00
Bob Swift
ee48da0b54
Add test for processing empty string (to confirm no divide-by-zero)
2021-09-09 12:28:34 -06:00
Bob Swift
3e5b060a37
Add ability to use multiple translation locales:
...
- Add new `artist_locales` setting and remove old `artist_locale`.
- Add new translation locales selector and ordering screen.
- Cycle through selected translation locales until a match is found.
- Update tests.
2021-09-08 17:47:16 -06:00
Bob Swift
e8aa0b3cd6
Add weighted script detector and multiple translation ignore options
2021-09-08 11:58:24 -06:00
Vladislav Karbovskii
7224961bc4
PICARD-157: Option to skip artist name translation for specific scripts
...
Add a dropdown to select a script for which artist translation will be skipped.
Co-authored-by: Laurent Monin <github@norz.org >
Co-authored-by: Bob Swift <bswift@rsds.ca >
2021-09-06 12:00:01 +02:00
Gabriel Ferreira
f42f78b0de
AcousticBrainz feature extraction and submission support
...
Co-authored-by: Laurent Monin <github@norz.org >
Co-authored-by: Philipp Wolfer <ph.wolfer@gmail.com >
2021-08-22 12:46:57 +02:00