PICARD-2496: Add option to skip moving files if destination already exists#3093
PICARD-2496: Add option to skip moving files if destination already exists#3093iron-prog wants to merge 2 commits intometabrainz:masterfrom
Conversation
rdswift
left a comment
There was a problem hiding this comment.
I haven't reviewed this in great depth to try to understand whether it is actually necessary or if this is the best solution. If it is necessary and appropriate, the documentation will absolutely need to be updated to explain the new configuration setting, but I see that you have indicated that there are no documentation changes required.
I may be wrong, but I suspect that the AI Usage in developing this PR is actually higher than you indicated.
| # Form implementation generated from reading ui file 'ui/options_renaming.ui' | ||
| # | ||
| # Created by: PyQt6 UI code generator 6.9.1 | ||
| # | ||
| # Automatically generated - do not edit. | ||
| # Use `python setup.py build_ui` to update it. |
There was a problem hiding this comment.
The changes made in this file should be made in the ui/options_renaming.ui file (and the file regenerated using python setup.py build_ui), so that they are not lost when the ui files are regenerated in the future.
I guess your AI agent doesn't read the instructions in the file headers.
There was a problem hiding this comment.
AI was used for discussion about implementation approach,
UI integration, and preparing the PR description.
All code was manually reviewed and tested(not regressively but at a significant level).
|
For clarity for the users, perhaps there could be (mutually exclusive) radio buttons for the three options:
That way the preference could be stored in a single setting, rather than multiple binary settings relying on code to maintain their mutual exclusivity. |
|
thanks for this suggestion it's my bad for relying on ai |
Yes, I think it would be clearer. |
… (skip/rename/overwrite)
cc658cb to
aaea73a
Compare
Summary
This PR introduces a new option allowing Picard to skip moving files if the destination file already exists.
New option:
"Skip moving files if destination already exists"
Location:
Options → File Naming → Move files when saving
Behavior priority:
Adds a new configuration option allowing Picard to skip moving files if a file with the same name already exists in the destination directory.
Problem
When moving files during tagging, Picard currently either renames the file by adding a numbered suffix (e.g.,
(1)) or overwrites the existing file depending on user settings.Some users prefer to leave the file untouched if a file with the same name already exists in the destination directory.
Solution
This PR introduces a new setting
move_skip_existing_files.If enabled, Picard checks whether the destination file already exists before moving a file.
If it does exist, the move operation is skipped and the file remains in its original location.
Implementation details:
BoolOption(move_skip_existing_files) inoptions.pypicard/file.pyto skip the move when the option is enabledDefault behavior remains unchanged if the option is disabled.
AI Usage
In accordance with the AI use policy portion of the MetaBrainz Contribution Guidelines, the level of AI/LLM use in the development of this Pull Request is:
Action
Additional actions required: