diff --git a/lib/services/library_queue_store.dart b/lib/services/library_queue_store.dart index 5d6dd043..23936a08 100644 --- a/lib/services/library_queue_store.dart +++ b/lib/services/library_queue_store.dart @@ -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) { diff --git a/test/library_queue_store_test.dart b/test/library_queue_store_test.dart index 1ebd4b40..790bd064 100644 --- a/test/library_queue_store_test.dart +++ b/test/library_queue_store_test.dart @@ -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 {