Skip to content

Fix ignore_duplicates missing filtered tracks - #1288

Merged
flyingmutant merged 1 commit into
cmus:masterfrom
gavtroy:ignore-dups-filter-fix
Nov 5, 2023
Merged

flyingmutant merged 1 commit into
cmus:masterfrom
gavtroy:ignore-dups-filter-fix

Conversation

@gavtroy

@gavtroy gavtroy commented Aug 13, 2023

Copy link
Copy Markdown
Collaborator

Really just checking for duplicates again when unfiltering. A bit messy but it does the job.

The "entryp" naming is consistent with hash_remove() etc.

Relates to #423.

@pgaskin
pgaskin self-requested a review August 17, 2023 00:03
@flyingmutant
flyingmutant force-pushed the ignore-dups-filter-fix branch from aa82268 to 7824be7 Compare November 4, 2023 10:08
@flyingmutant

Copy link
Copy Markdown
Member

This makes code and intent really hard to follow: we are modifying hash (in a non-obvious way) inside a function called hash_add_to_views. I'd say some further work on this is required.

@gavtroy

gavtroy commented Nov 4, 2023

Copy link
Copy Markdown
Collaborator Author

Then for simplicity we can leave the duplicates in the hash and just skip adding them to the views. The only slight downside is future hash_add_to_views invocations (i.e. clearing a filter) could be slightly slower with a lot of duplicates... not something that matters in practice.

@gavtroy
gavtroy force-pushed the ignore-dups-filter-fix branch from 7824be7 to 6af9ede Compare November 4, 2023 20:57
Really just checking for duplicates again when unfiltering. A bit messy
but it does the job.

Relates to cmus#423.
@flyingmutant
flyingmutant force-pushed the ignore-dups-filter-fix branch from 6af9ede to 5f45322 Compare November 5, 2023 07:55
@flyingmutant
flyingmutant merged commit 23afab3 into cmus:master Nov 5, 2023
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.

2 participants