mirror of
https://github.com/clangen/musikcube.git
synced 2025-03-14 13:21:13 +00:00
AlbumListQuery will also apply the filter to artist name as well. Improves
the user experience while filtering albums.
This commit is contained in:
parent
c506d69fde
commit
e8985aadd1
@ -70,7 +70,7 @@ static const std::string TABLES =
|
||||
"albums, tracks, artists ";
|
||||
|
||||
static const std::string FILTER_PREDICATE =
|
||||
" LOWER(album) like ? AND ";
|
||||
" (LOWER(album) like ? OR LOWER(album_artist) like ?) AND ";
|
||||
|
||||
static const std::string CATEGORY_PREDICATE =
|
||||
" tracks.%s=? AND ";
|
||||
@ -127,10 +127,6 @@ bool AlbumListQuery::OnRun(Connection& db) {
|
||||
|
||||
Statement stmt(query.c_str(), db);
|
||||
|
||||
if (filtered) {
|
||||
|
||||
}
|
||||
|
||||
int bindIndex = 0;
|
||||
|
||||
if (filtered) {
|
||||
@ -139,6 +135,7 @@ bool AlbumListQuery::OnRun(Connection& db) {
|
||||
std::transform(wild.begin(), wild.end(), wild.begin(), tolower);
|
||||
wild = "%" + wild + "%";
|
||||
stmt.BindText(bindIndex++, wild);
|
||||
stmt.BindText(bindIndex++, wild);
|
||||
}
|
||||
|
||||
if (category) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user