fix(library): honor album artist filters in summary counts

This commit is contained in:
zarzet committed 2026-10-05 17:53:18 +07:00
1 parent a8712a44b1
commit bf40ef8ebe
2 files changed
+18

No files matched your search

+1
View File
@@ -148,6 +148,7 @@ class LibraryQueueStore {
QueueLibraryDbQuery request,
) async {
if (sqlite.normalizeLookupText(request.searchQuery).isNotEmpty ||
request.albumArtist != null ||
request.quality != null ||
request.format != null ||
request.metadata != null) {
+17
View File
@@ -231,6 +231,23 @@ void main() {
},
);
test('artist counts use the same filter as the track query', () async {
for (final artist in ['Artist', 'Another Artist', 'Missing Artist']) {
final query = QueueLibraryDbQuery(albumArtist: artist);
final counts = await store.counts(query);
final tracks = await store.trackPage(query);
expect(counts.allTrackCount, tracks.rows.length, reason: artist);
expect(
[counts.allTrackCount, counts.albumCount, counts.singleTrackCount],
switch (artist) {
'Artist' => [4, 2, 0],
'Another Artist' => [1, 0, 1],
_ => [0, 0, 0],
},
);
}
});
test(
'independent FTS inputs match LIKE fallback and escape literal search',
() async {