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

Comments

Projects
None yet
2 participants
@RollingStar
Copy link
Contributor

commented Jan 13, 2019

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 label Jan 13, 2019

@sampsyo

This comment has been minimized.

Copy link
Member

commented Jan 13, 2019

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

@RollingStar

This comment has been minimized.

Copy link
Contributor Author

commented Jan 16, 2019

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

This comment has been minimized.

Copy link
Member

commented Jan 16, 2019

Awesome! Thank you!!

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

@RollingStar

This comment has been minimized.

Copy link
Contributor Author

commented Jan 16, 2019

Good idea.

#3120

sampsyo added a commit that referenced this issue Jan 19, 2019

Merge pull request #3120 from RollingStar/master
More verbose move message (#3117)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.