Skip to content
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

More helpful message than "moving 0 albums" #3117

Closed
RollingStar opened this issue Jan 13, 2019 · 4 comments
Closed

More helpful message than "moving 0 albums" #3117

RollingStar opened this issue Jan 13, 2019 · 4 comments
Labels
feature features we would like to implement

Comments

@RollingStar
Copy link
Collaborator

Problem

When running beet mv, beets filters the move job to remove any move operations that have the same source and destination. But this can be unintuitive: albums will show up in "beet ls" then vanish when you run "beet mv".

def move_items(lib, dest, query, copy, album, pretend, confirm=False,

λ beet ls -a Bad
Michael Jackson - Bad
“Weird Al” Yankovic - Bad Hair Day

λ beet mv -p -a Bad
Moving 0 albums.

λ beet mv -a Bad
Moving 0 albums.

Proposed Solution

Save the results of objs into something like orig_objs and compare it to objs after the filter operation is complete. The new output message could be something like:

Moving 0 albums (found 2 with same source/destination)
@sampsyo sampsyo added the feature features we would like to implement label Jan 13, 2019
@sampsyo
Copy link
Member

sampsyo commented Jan 13, 2019

Good call; this would be a useful thing to print.

@RollingStar
Copy link
Collaborator Author

master...RollingStar:verbose-move

Here it is in action, with different output depending on if there are any objects filtered out.

λ beet mv -a bad                                          
Moving 0 albums (found 3 with same source & destination). 

λ beet mv -a bad                                          
Moving 3 albums.                                          

λ beet mv jackson                                         
Moving 71 items (found 11 with same source & destination).

λ beet mv jackson                                         
Moving 82 items.                                          

λ beet mv -a weird al                                     
Moving 1 album (found 15 with same source & destination). 

I think I have some work to do on my forked repo to not make this change have six git commits attached to it. Then I can submit a PR.

@sampsyo
Copy link
Member

sampsyo commented Jan 16, 2019

Awesome! Thank you!!

May I suggest some slightly simpler wording: for example, “15 already in place”?

@RollingStar
Copy link
Collaborator Author

Good idea.

#3120

sampsyo added a commit that referenced this issue Jan 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature features we would like to implement
Projects
None yet
Development

No branches or pull requests

2 participants