-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
First implementation for selective modify #1838
Conversation
Please do not merge this branch at the moment. It is just a preview. I want to add some tests before merging it |
fd7048e
to
73468dc
Compare
ok, coverage of the modify option is now nearly 100%. Except from one line with a KeyError exception. Are we ok to merge this? |
Aha, I think I understand what's going on here---the command now interactively asks you to say "yes" or "no" to each matching object. Is that right? If so, I'd love to pause and consider the best way to do this. It seems like the need for a "selective" mode is not necessarily unique to the Of course, that might be more trouble than it's worth, in which case this specific feature looks OK. We'll need to add to the documentation (and the changelog) before merging in any case. |
@@ -1364,6 +1368,16 @@ def modify_items(lib, mods, dels, query, write, move, album, confirm): | |||
obj.try_sync(write, move) | |||
|
|||
|
|||
def print_modify_item(obj, mods, dels): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This new function needs a docstring.
Also: thanks for expanding the tests! ✨ This coverage is awesome. |
Hi, you are right: this feature might be interesting for other commands also. But i don't know how to implement this in a clean way. Let me think about it a bit. I will give a shout if i have any ideas. If it turns out that it is not that easy, i will cherry pick the commits to improve coverage tomorrow. |
I am closing this PR now because #1843 will implement this feature in a better way |
see #1723