mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-05 05:37:29 +02:00
* Fixed filtering by artist name.
This commit is contained in:
@@ -45,7 +45,7 @@ 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 :filter OR track.name LIKE :filter )" );
|
filterToken = QString( "AND file_join.track = track.id AND ( artist.name LIKE :filterA OR track.name LIKE :filterT )" );
|
||||||
tables = "artist, track, file, file_join";
|
tables = "artist, track, file, file_join";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -66,7 +66,10 @@ DatabaseCommand_AllArtists::exec( DatabaseImpl* dbi )
|
|||||||
|
|
||||||
query.prepare( sql );
|
query.prepare( sql );
|
||||||
if ( !m_filter.isEmpty() )
|
if ( !m_filter.isEmpty() )
|
||||||
query.bindValue( ":filter", QString( "%%1%" ).arg( m_filter ) );
|
{
|
||||||
|
query.bindValue( ":filterA", QString( "%%1%" ).arg( m_filter ) );
|
||||||
|
query.bindValue( ":filterT", QString( "%%1%" ).arg( m_filter ) );
|
||||||
|
}
|
||||||
|
|
||||||
query.exec();
|
query.exec();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user