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

Basic summary information for duplicates #900

Merged
merged 5 commits into from Aug 19, 2014
Merged

Basic summary information for duplicates #900

merged 5 commits into from Aug 19, 2014

Conversation

howardjones
Copy link
Contributor

Added a one-line summary of each album (in lib, and import target) so
you can easily tell if (for example) you are about to overwrite your
FLAC copy with a low-bitrate mp3 from somewhere else.

Added a one-line summary of each album (in lib, and import target) so
you can easily tell if (for example) you are about to overwrite your
FLAC copy with a low-bitrate mp3 from somewhere else.
@howardjones
Copy link
Contributor Author

Leaving a new output of:

This album is already in the library!
OLD: 13 items. 13 FLAC. 847141 average bitrate. 2988s total length.
NEW: 13 items. 13 MP3. 205687 average bitrate. 2989s total length.
[S]kip new, Keep both, Remove old?

collections library is only available in Py 2.7+
@@ -741,6 +741,23 @@ def choose_item(self, task):
assert isinstance(choice, autotag.TrackMatch)
return choice

def summarize_items(self,items):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this doesn't need to be a method, right (i.e., it doesn't use self)? Can we make it a top-level utility function?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True enough. I will change it.

@sampsyo
Copy link
Member

sampsyo commented Aug 17, 2014

This is awesome! ✨ 🚀 👍 Can't wait to ship it.

I've got a few suggestions for finishing this off. Happy to help with any of them.

@howardjones
Copy link
Contributor Author

I think that's a bit nicer now.

The next logical thing is to make an automated function to do scoring, a la #116 I guess. This is what my old perl mp3-auto-filing script did. Score 1000 for each FLAC, mp3_bitrate for each mp3.

Not sure how that (or beets generally) will deal with replacing the "deluxe edition" of an album with the regular version of the same album - i.e. the first 12 tracks are identical, but the existing lib version has 6 bonus tracks. It looks like it will see them as identical currently (it only checks the import's items against the lib, not the other way around).

@sampsyo
Copy link
Member

sampsyo commented Aug 19, 2014

Awesome; this is looking great. Thanks for taking those comments into consideration.

Yep, scoring would be useful but certainly complicated!

One other possible next step would be making this work for "in-flight" albums. You may have noticed that resolve_duplicate gets called even when find_duplicates returns nothing—specifically when the album is in seen_idents. The reason is that albums that were just imported won't be in the database yet and therefore won't be found by find_duplicates.

@sampsyo sampsyo merged commit 4aa783f into beetbox:master Aug 19, 2014
sampsyo added a commit that referenced this pull request Aug 19, 2014
Basic summary information for duplicates
sampsyo added a commit that referenced this pull request Aug 19, 2014
sampsyo added a commit that referenced this pull request Aug 19, 2014
sampsyo added a commit that referenced this pull request Aug 19, 2014
@sampsyo
Copy link
Member

sampsyo commented Aug 19, 2014

All merged up! Thanks again.

sampsyo added a commit that referenced this pull request Aug 19, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants