search: match file names case-insensitively

Not doing this lead to some inconsistent search results at points.

Resolves #437.
This commit is contained in:
Alexander Capehart 2023-05-11 12:21:58 -06:00
parent c7b875376c
commit b72f33a989
No known key found for this signature in database
GPG key ID: 37DBE3621FE9AD47
2 changed files with 6 additions and 2 deletions

View file

@ -2,9 +2,14 @@
## dev ## dev
#### What's Improved
- Sorting now handles numbers of arbitrary length
- Punctuation is now ignored in sorting with intelligent sort names disabled
#### What's Fixed #### What's Fixed
- Fixed issue where vorbis comments in the form of `metadata_block_picture` (lowercase) would not - Fixed issue where vorbis comments in the form of `metadata_block_picture` (lowercase) would not
be parsed as images be parsed as images
- Fixed issue where searches would match song file names case-sensitively
## 3.0.5 ## 3.0.5

View file

@ -66,8 +66,7 @@ class SearchEngineImpl @Inject constructor(@ApplicationContext private val conte
SearchEngine.Items( SearchEngine.Items(
songs = songs =
items.songs?.searchListImpl(query) { q, song -> items.songs?.searchListImpl(query) { q, song ->
// FIXME: Match case-insensitively song.path.name.contains(q, ignoreCase = true)
song.path.name.contains(q)
}, },
albums = items.albums?.searchListImpl(query), albums = items.albums?.searchListImpl(query),
artists = items.artists?.searchListImpl(query), artists = items.artists?.searchListImpl(query),