diff --git a/src/libtomahawk/resolvers/ScriptCommand_AllAlbums.cpp b/src/libtomahawk/resolvers/ScriptCommand_AllAlbums.cpp index 9ee64259a..64429562f 100644 --- a/src/libtomahawk/resolvers/ScriptCommand_AllAlbums.cpp +++ b/src/libtomahawk/resolvers/ScriptCommand_AllAlbums.cpp @@ -107,7 +107,7 @@ ScriptCommand_AllAlbums::reportFailure() void -ScriptCommand_AllAlbums::onAlbumsJobDone(const QVariantMap& result) +ScriptCommand_AllAlbums::onAlbumsJobDone( const QVariantMap& result ) { ScriptJob* job = qobject_cast< ScriptJob* >( sender() ); Q_ASSERT( job ); @@ -129,19 +129,7 @@ ScriptCommand_AllAlbums::onAlbumsJobDone(const QVariantMap& result) } QList< Tomahawk::album_ptr > a = parseAlbumVariantList( resultArtists, result[ "albums" ].toList() ); - if ( m_filter.isEmpty() ) - emit albums( a ); - else - { - QList< Tomahawk::album_ptr > filtered; - foreach( const Tomahawk::album_ptr& album, a ) - { - if( album->name().toLower().contains( m_filter.toLower() ) || - album->artist()->name().toLower().contains( m_filter.toLower() ) ) - filtered.append( album ); - } - emit albums( filtered ); - } + emit albums( a ); emit done(); job->deleteLater(); diff --git a/src/libtomahawk/resolvers/ScriptCommand_AllArtists.cpp b/src/libtomahawk/resolvers/ScriptCommand_AllArtists.cpp index 3a606298d..6b6a0930d 100644 --- a/src/libtomahawk/resolvers/ScriptCommand_AllArtists.cpp +++ b/src/libtomahawk/resolvers/ScriptCommand_AllArtists.cpp @@ -98,22 +98,7 @@ ScriptCommand_AllArtists::onArtistsJobDone( const QVariantMap& result ) } QList< Tomahawk::artist_ptr > a = parseArtistVariantList( result[ "artists" ].toList() ); - - if ( m_filter.isEmpty() ) - { - emit artists( a ); - } - else - { - QList< Tomahawk::artist_ptr > filtered; - foreach( const Tomahawk::artist_ptr& artist, a ) - { - if ( artist->name().contains( m_filter ) ) - filtered.append( artist ); - } - emit artists( a ); - } - + emit artists( a ); emit done(); job->deleteLater();