mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-14 01:54:07 +02:00
Don't parse artists/albums for non-fulltext queries
This commit is contained in:
@@ -541,7 +541,6 @@ void
|
||||
JSResolver::resolve( const Tomahawk::query_ptr& query )
|
||||
{
|
||||
ScriptJob* job = scriptAccount()->resolve( scriptObject(), query, "resolver" );
|
||||
|
||||
connect( job, SIGNAL( done( QVariantMap ) ), SLOT( onResolveRequestDone( QVariantMap ) ) );
|
||||
|
||||
job->start();
|
||||
@@ -563,11 +562,17 @@ JSResolver::onResolveRequestDone( const QVariantMap& data )
|
||||
}
|
||||
else
|
||||
{
|
||||
QList< artist_ptr > artists = scriptAccount()->parseArtistVariantList( data.value( "artists" ).toList() );
|
||||
Tomahawk::Pipeline::instance()->reportArtists( qid, artists );
|
||||
if ( !data.value( "artists" ).isNull() )
|
||||
{
|
||||
QList< artist_ptr > artists = scriptAccount()->parseArtistVariantList( data.value( "artists" ).toList() );
|
||||
Tomahawk::Pipeline::instance()->reportArtists( qid, artists );
|
||||
}
|
||||
|
||||
QList< album_ptr > albums = scriptAccount()->parseAlbumVariantList( data.value( "albums" ).toList() );
|
||||
Tomahawk::Pipeline::instance()->reportAlbums( qid, albums );
|
||||
if ( !data.value( "albums" ).isNull() )
|
||||
{
|
||||
QList< album_ptr > albums = scriptAccount()->parseAlbumVariantList( data.value( "albums" ).toList() );
|
||||
Tomahawk::Pipeline::instance()->reportAlbums( qid, albums );
|
||||
}
|
||||
|
||||
QList< Tomahawk::result_ptr > results = scriptAccount()->parseResultVariantList( data.value( "tracks" ).toList() );
|
||||
foreach( const result_ptr& result, results )
|
||||
|
Reference in New Issue
Block a user