Skip to content

Ignore duplicates when adding tracks to the library - #1052

Merged
flyingmutant merged 1 commit into
cmus:masterfrom
gavtroy:dev_ignore_dups
Jul 13, 2023
Merged

flyingmutant merged 1 commit into
cmus:masterfrom
gavtroy:dev_ignore_dups

Conversation

@gavtroy

@gavtroy gavtroy commented Jan 30, 2021

Copy link
Copy Markdown
Collaborator

Closes #423.

@gavtroy
gavtroy force-pushed the dev_ignore_dups branch 2 times, most recently from 85023bc to eebc1ec Compare February 4, 2021 22:40
Comment thread Doc/cmus.txt

ignore_duplicates (true)
Ignore duplicates when adding tracks to the library. A track is a duplicate
if it has a matching artist, album, disc number, track number, and track

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I wonder if it might be a good idea to check the length too.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

On the one hand I'd worry the same track could be +/- 1 second depending on encoder, album edition, etc. At the same time, in my quite tidy library there was just one duplicate: an album with two "0. Bonus Track" that were in fact different bonus tracks. A length check would have caught that.

Overall I don't know which works better for all the real world messy libraries out there. If I go by feelings, the second "0. Bonus Track" deserved to get removed. 😁

@pgaskin pgaskin Feb 25, 2021 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

A length check would have caught that.

That's the kind of situation I had in mind.

real world messy libraries out there

For simplicity, it might be easier to keep it without the length check, and to add an option to force-add tracks.

If more granularity is needed in the future, another duplicate_method option could be added with different checks.

Comment thread lib.c Resolved
Comment thread options.c Resolved
@gavtroy

gavtroy commented Jul 9, 2023

Copy link
Copy Markdown
Collaborator Author

Just a simple rebase to fix the conflict. I still think we compare enough already that comparing the track durations isn't going to be helpful, but let me know if there's strong objection and I can look at it.

@pgaskin pgaskin left a comment

Copy link
Copy Markdown
Member

@pgaskin

pgaskin commented Jul 13, 2023

Copy link
Copy Markdown
Member

@flyingmutant, this then a release?

@flyingmutant
flyingmutant merged commit 6167caa into cmus:master Jul 13, 2023
@flyingmutant

Copy link
Copy Markdown
Member

@flyingmutant, this then a release?

What about your draft PRs?

@pgaskin

pgaskin commented Jul 13, 2023

Copy link
Copy Markdown
Member

What about your draft PRs?

I personally use packages built from my dev fork of cmus including them, so I (and the few hundred other users of those packages) am not affected too much if they doesn't go out in the next release.

The pl-env one works fine, but there's a few minor things I need to change based on the review comments. I'll do them soon, probably by the end of today, just in case you want to release it.

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.

Duplicate files while scanning library

3 participants