(fix) BaseTrackCache: fix filterAndSort() to avoid unwanted extra tracks with extraFilter#15571
(fix) BaseTrackCache: fix filterAndSort() to avoid unwanted extra tracks with extraFilter#15571ronso0 wants to merge 1 commit into
Conversation
If this is true, and we use extraFilter only for _basic_¹ filtering, we could as well
¹ basic like use search operators like users do via searchbar |
|
Mabe we can use this bug a kick for a full revamp of the analyser window. I have never used this feature, because it does not match may use cases. "All" is useless (it was a workaround before we had the analysis context menu). "New" the 7 new days are too inflexible, independent form the purpose of Analyzing new Tracks. How about making it "Inbox"/"Todo" box. Maybe a special playlist?
Alternative:
This fix here is good for the stable 2.5. |
daschuer
left a comment
There was a problem hiding this comment.
This fixes one issue, by introducing another.
Before, dirty tracks appears in the list. Now all dirty tracks disappear, including the tracks that should remain.
If you edit metadata of a track in the Analyser view it disappears from the view.
Ah okay, that's what dirty tracks are. Regarding the Analyze view I'd prefer to move in small steps. |
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)whereextraFilteris 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.