mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-16 02:54:33 +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 )
|
JSResolver::resolve( const Tomahawk::query_ptr& query )
|
||||||
{
|
{
|
||||||
ScriptJob* job = scriptAccount()->resolve( scriptObject(), query, "resolver" );
|
ScriptJob* job = scriptAccount()->resolve( scriptObject(), query, "resolver" );
|
||||||
|
|
||||||
connect( job, SIGNAL( done( QVariantMap ) ), SLOT( onResolveRequestDone( QVariantMap ) ) );
|
connect( job, SIGNAL( done( QVariantMap ) ), SLOT( onResolveRequestDone( QVariantMap ) ) );
|
||||||
|
|
||||||
job->start();
|
job->start();
|
||||||
@@ -563,11 +562,17 @@ JSResolver::onResolveRequestDone( const QVariantMap& data )
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
QList< artist_ptr > artists = scriptAccount()->parseArtistVariantList( data.value( "artists" ).toList() );
|
if ( !data.value( "artists" ).isNull() )
|
||||||
Tomahawk::Pipeline::instance()->reportArtists( qid, artists );
|
{
|
||||||
|
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() );
|
if ( !data.value( "albums" ).isNull() )
|
||||||
Tomahawk::Pipeline::instance()->reportAlbums( qid, albums );
|
{
|
||||||
|
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() );
|
QList< Tomahawk::result_ptr > results = scriptAccount()->parseResultVariantList( data.value( "tracks" ).toList() );
|
||||||
foreach( const result_ptr& result, results )
|
foreach( const result_ptr& result, results )
|
||||||
|
Reference in New Issue
Block a user