Bob Swift
3f832f98eb
Add more tests and show profile stack in comments after each change
2021-07-14 09:57:31 -06:00
Bob Swift
377c2f3561
Allow saving options settings to specified profile
2021-07-10 14:35:39 -06:00
Bob Swift
c046c0ad23
Miscellaneous style cleanup items
...
In `picard/ui/profileeditor.py`:
- Remove unnecessary `deepcopy()`.
- Use `set.difference()` for comparing key sets.
- Add explanation for creating missing key in
`get_settings_for_profile()` method.
- Move `settings` declaration into `if` section where it is used.
- Remove unnecessary `.keys()` call when creating set of profile IDs.
- Use `set.difference()` for comparing setting sets.
- Remove unnecessary `self.loading` check.
- Add class constant for which QTreeWidgetItem column to use.
In test/test_profiles.py:
- Use keys defined in `SettingConfigSection` class.
2021-06-26 08:51:12 -06:00
Bob Swift
ec176d5ce9
Fix KeyError and add tests
2021-06-25 12:20:06 -06:00
Bob Swift
2ea04a49cb
Move profiles to config.profiles. Need to resolve failing tests.
2021-06-24 21:20:48 -06:00
Bob Swift
20ca5ec529
Add tests
2021-06-24 15:21:25 -06:00
Philipp Wolfer
8ce7fdc850
Removed left-over Python 2 Unicode string modifiers
2021-06-19 14:14:40 +02:00
Philipp Wolfer
6d0a052506
PICRD-257: Added format specific tests for preserve_images
...
Testing special handling in Vorbis and APEv2 files.
2021-06-16 08:52:55 +02:00
Philipp Wolfer
a3ebc1cb22
PICARD-257: Add option to exclude embedded images from clear_existing_tags
2021-06-16 08:52:55 +02:00
Laurent Monin
41d28360a6
get_submission_server(): return a named tuple
2021-06-15 10:18:44 +02:00
Laurent Monin
4c1f4e1f06
get_submission_host() -> get_submission_server()
2021-06-15 10:18:44 +02:00
Philipp Wolfer
28a5fc19e5
PICARD-2232: Add option to enable data submission to unofficial server
...
Show a warning when user configures unofficial server and add an option use_server_for_submission to use this server also for data submission.
2021-06-15 07:51:07 +02:00
Philipp Wolfer
2e4ef20744
PICARD-2232: Add helper functions to get official server for submission
...
Use those functions in addrelease instead of custom implementation
2021-06-15 07:51:05 +02:00
Philipp Wolfer
f0ff6d030b
Merge pull request #1840 from rdswift/refactor_script_list
...
Refactor to reduce duplication of file naming script text in user settings
2021-06-14 16:31:35 +02:00
Philipp Wolfer
d7cfb891de
PICARD-2203: Ensure addrelease disc and track numbers are zero-based and consecutive
2021-06-14 11:45:58 +02:00
Bob Swift
3764518d7f
Fix tests.
2021-06-13 17:45:21 -06:00
Philipp Wolfer
fe5970f25a
PICARD-2226: Removed config object per thread again
...
Syncing between those instances does not work as advertised, which causes missing updates on config changes.
2021-06-05 00:31:13 +02:00
Laurent Monin
ab54651438
Update headers
2021-06-03 13:20:42 +02:00
Laurent Monin
a4a6508b2f
tracknum_and_title_from_filename(): return a named tuple
2021-06-03 13:02:46 +02:00
Laurent Monin
16b6fe3473
Add tests for File._guess_tracknumber_and_title()
2021-06-03 13:00:41 +02:00
Philipp Wolfer
0209b5ed28
PICARD-2218: Support setting regex flags in $performer pattern
2021-06-02 23:18:45 +02:00
Philipp Wolfer
bdfd5b8156
PICARD-2218: Regex in $performer need to be explicitly enclosed in /.../
...
Reuse pattern_as_regex to parse the pattern expression
2021-06-02 23:02:48 +02:00
Philipp Wolfer
f94004763b
Add picard.util.pattern_as_regex to parse string patterns as regular expressions
...
Replace the custom implementation of pattern parsing in TagGenreFilter with pattern_as_regex
2021-06-02 23:02:47 +02:00
Philipp Wolfer
4aae0bcc2c
PICARD-2218: Allow regular expressions in $performer(pattern)
2021-06-02 22:03:58 +02:00
Philipp Wolfer
f79e72b14b
PICARD-2216: $performer(pattern) should match only the performance part of tag names
...
Extended tests to properly test for this condition and also proper handling of multi-value tags.
2021-06-02 22:03:58 +02:00
Philipp Wolfer
3fc5e52544
Added mac_compat parameter to make_save_path
2021-06-02 20:22:04 +02:00
Philipp Wolfer
1081a43713
Added utility function to add numbers to filenames on name conflict
...
Use this function in file naming
2021-06-02 20:22:03 +02:00
Philipp Wolfer
dd5ba96bf2
Move path compat cleanup code to util.filenaming.make_save_path
2021-06-02 20:22:02 +02:00
Philipp Wolfer
6d8ddca958
PICARD-2220: Add default extension to files without extension
...
Added tests for handling file extensions (missing, lowercasing, scripted).
2021-06-02 20:22:01 +02:00
Philipp Wolfer
d6cf57f548
PICARD-2219: Fix empty renaming script breaking the filename
...
A renaming script evaluating to an empty name would cause files to be renamed to e.g. "_mp3", breaking the file extension. Now the original filename will be kept.
2021-06-02 11:32:32 +02:00
Bob Swift
3b6dbb7427
Add comments and additional test. Update mocked functions.
2021-06-01 08:36:35 -06:00
Bob Swift
4f4605d2ce
Manually add gettext_countries to builtins if it is missing
2021-05-31 14:46:48 -06:00
Bob Swift
7c2be76c75
Use mock for all locale tests
2021-05-31 14:46:48 -06:00
Bob Swift
93519739d7
Use mock for Russian locale tests
2021-05-31 14:46:48 -06:00
Bob Swift
7592a894da
Add option to determine whether or not the output is translated.
2021-05-31 14:46:47 -06:00
Bob Swift
7ee6b44241
Disable failing test using Russia as locale.
2021-05-31 14:46:47 -06:00
Bob Swift
75583f3e9f
Test using both Russian and English locales
2021-05-31 14:46:47 -06:00
Bob Swift
eb34f66c1a
Return country name in currently active UI language.
2021-05-31 14:46:47 -06:00
Bob Swift
27324e8259
Add script $countryname() function.
2021-05-31 14:46:46 -06:00
Philipp Wolfer
c80e7ea758
PICARD-2214: Fix exception if script ends with backslash
2021-05-28 13:14:07 +02:00
Philipp Wolfer
3478a98744
PICARD-2213: Removed methods for script JSON serialization
...
Focus on YAML support
2021-05-20 08:42:00 +02:00
Philipp Wolfer
ff3e6f80f2
PICARD-2213: Move classes for script serialization into submodule
2021-05-19 12:31:15 +02:00
Bob Swift
c1907c7902
Make UI more intuitive
...
- Add `Close` button
- Confirm actions which may lose unsaved edits
- Remove `Select` button and automatically select the current script
- Save selected script id and open editor to that script
- Update the `file_naming_format` setting when script changes are saved
2021-05-08 11:12:09 -06:00
Bob Swift
2f07d03495
Remove unused import
2021-05-07 20:57:25 -06:00
Bob Swift
33a2dc9a31
Switch back to using JSON for import / export scripts
2021-05-07 20:54:28 -06:00
Bob Swift
9c033acdbc
Change script_version to script_language_version to avoid confusion
2021-05-07 13:47:37 -06:00
Bob Swift
7ae73f7e12
Add script_version. Unify copy() method. Use __getitem__() method.
2021-05-07 12:49:37 -06:00
Bob Swift
4761ece369
Misc code cleanup, formatting and optimization
...
- Base PicardScriptType class on IntEnum
- Change _last_updated_ignore_list and JSON_OUTPUT lists to sets
- Fix translation issue with copied script titles
- Fix translation issue with preset script titles
- Standardize last updated dates for preset scripts
- Reformat long lines
- Add helper function for outputting file errors
- Replace `indented=bool` with `indent=int` in to_json()
2021-05-06 11:31:39 -06:00
Bob Swift
c09dde4d4a
Format JSON output files with indentation
2021-05-06 07:57:02 -06:00
Bob Swift
cf37ce089d
Update formatting to conform to flake8
2021-05-05 17:08:02 -06:00