Skip to content

Conversation

@ronso0
Copy link
Member

@ronso0 ronso0 commented Nov 11, 2025

Another take to fix #14873 and similar symptoms in #14687 for me.

The issue:

#14873: unrelated (older) tracks show up with the 'New' filter in the Analyze view.
With #14687 'dirty' tracks pop up in the Computer directory views that use LibraryTableModel.

Root cause:

So called "extra filters" are sent to SearchQueryParser::parseQuery(query, extraFilter) where extraFilter is wrapped as SqlNode.
In BaseTrackCache we add dirty tracks to the current view if they are missing but match the query -- however the extraFilter SqlNode::match(pTrack) always returns true, making the check pointless because it adds dirty tracks even if they don't belong into the view.

(Quick) Fix:

Don't use extraFilter.
Actually Analyze is the only view that makes use of it for the New filter (get only tracks added during last week), so we can

  • use a user-formatted filter like we'd use in the search bar
  • append it to the search string (user input)
  • let the query parser construct a proper query
  • whose match(TrackPointer) function really does a per-track match

and

  • do the TrackId match with a QSet<TrackId> (not with a SqlNode)

Works fine for me in Analyze, no dirty tracks anymore.

@ronso0 ronso0 force-pushed the search-dateadded-for-analyze branch from 383e343 to 022e9ee Compare November 29, 2025 18:12
@ronso0 ronso0 marked this pull request as ready for review November 29, 2025 18:12
@ronso0
Copy link
Member Author

ronso0 commented Nov 29, 2025

Rebased and ready for review

Copy link
Member

@daschuer daschuer left a comment

Choose a reason for hiding this comment

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

LGTM and works good. Thank you for drilling that down to the bottom.

@daschuer daschuer merged commit 875c2a2 into mixxxdj:2.5 Nov 30, 2025
25 checks passed
@ronso0 ronso0 deleted the search-dateadded-for-analyze branch November 30, 2025 12:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants