Skip to content

Conversation

@ronso0
Copy link
Member

@ronso0 ronso0 commented Nov 3, 2025

Fixes #14873 and similar symptoms in #14687 for me.
I only understand parts of BaseTrackCache, so I don't know how this can affect the 'dirty tracks' thing in real life.

The issue:

In #14687 tracks pop up in the Computer directory views that use LibraryTableModel.
Same for #14873, unrelated (older) tracks show up in Analyze view.

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.

Fix:

refine that check and only consider SqlNode::Match() if the extraFilter is empty.

As far as I can tell, Analyze (and #14687) are the only features that make use of the extra filter.
But I'm not sure, so there may be side effects for other library views, too.

@ronso0 ronso0 marked this pull request as ready for review November 3, 2025 14:25
@ronso0 ronso0 added this to the 2.5.4 milestone Nov 3, 2025
@ronso0
Copy link
Member Author

ronso0 commented Nov 3, 2025

As far as I can tell, Analyze (and #14687) are the only features that make use of the extra filter.

If this is true, and we use extraFilter only for _basic_¹ filtering, we could as well

  1. fix the datetime_added filter (this is currently a TextFilterNode 🙄 )
  2. make extraFilter an OrNode -> parses text input like from searchbar
  3. rework the date added filter in Analyze (date > now - 7 days)
  4. (add a directory filter for use in (feat) Computer feature: use library data model if selected path is watched by library #14687)

¹ basic like use search operators like users do via searchbar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant