mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-02 12:20:45 +02:00
* Allow filtering by album name.
This commit is contained in:
@@ -45,8 +45,9 @@ DatabaseCommand_AllArtists::exec( DatabaseImpl* dbi )
|
|||||||
|
|
||||||
if ( !m_filter.isEmpty() )
|
if ( !m_filter.isEmpty() )
|
||||||
{
|
{
|
||||||
filterToken = QString( "AND file_join.track = track.id AND ( artist.name LIKE :filterA OR track.name LIKE :filterT )" );
|
filterToken = QString( "AND file_join.album = album.id AND file_join.track = track.id "
|
||||||
tables = "artist, track, file, file_join";
|
"AND ( artist.name LIKE :filterA OR album.name LIKE :filterB OR track.name LIKE :filterC )" );
|
||||||
|
tables = "artist, track, album, file, file_join";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
tables = "artist, file, file_join";
|
tables = "artist, file, file_join";
|
||||||
@@ -68,7 +69,8 @@ DatabaseCommand_AllArtists::exec( DatabaseImpl* dbi )
|
|||||||
if ( !m_filter.isEmpty() )
|
if ( !m_filter.isEmpty() )
|
||||||
{
|
{
|
||||||
query.bindValue( ":filterA", QString( "%%1%" ).arg( m_filter ) );
|
query.bindValue( ":filterA", QString( "%%1%" ).arg( m_filter ) );
|
||||||
query.bindValue( ":filterT", QString( "%%1%" ).arg( m_filter ) );
|
query.bindValue( ":filterB", QString( "%%1%" ).arg( m_filter ) );
|
||||||
|
query.bindValue( ":filterC", QString( "%%1%" ).arg( m_filter ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
query.exec();
|
query.exec();
|
||||||
|
Reference in New Issue
Block a user