Change query to find both albums by artist and album artist

This commit is contained in:
Jonas Kvinge
2019-04-18 00:45:32 +02:00
parent 91e597bbdd
commit 37b923bea3
4 changed files with 19 additions and 18 deletions

View File

@@ -135,6 +135,14 @@ void CollectionQuery::AddWhere(const QString &column, const QVariant &value, con
}
void CollectionQuery::AddWhereArtist(const QVariant &value) {
where_clauses_ << QString("((artist = ? AND albumartist = '') OR albumartist = ?)");
bound_values_ << value;
bound_values_ << value;
}
void CollectionQuery::AddCompilationRequirement(bool compilation) {
// The unary + is added to prevent sqlite from using the index idx_comp_artist.
// When joining with fts, sqlite 3.8 has a tendency to use this index and thereby nesting the tables in an order which gives very poor performance