diff --git a/src/libtomahawk/accounts/spotify/SpotifyPlaylistUpdater.h b/src/libtomahawk/accounts/spotify/SpotifyPlaylistUpdater.h index 095e76379..b5de8e4b9 100644 --- a/src/libtomahawk/accounts/spotify/SpotifyPlaylistUpdater.h +++ b/src/libtomahawk/accounts/spotify/SpotifyPlaylistUpdater.h @@ -2,6 +2,7 @@ * * Copyright 2010-2012, Leo Franchi * Copyright 2012, Hugo Lindström + * * Tomahawk is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or diff --git a/src/libtomahawk/resolvers/ScriptResolver.cpp b/src/libtomahawk/resolvers/ScriptResolver.cpp index b1bdbd6e7..b5d5742cc 100644 --- a/src/libtomahawk/resolvers/ScriptResolver.cpp +++ b/src/libtomahawk/resolvers/ScriptResolver.cpp @@ -341,8 +341,6 @@ ScriptResolver::resolve( const Tomahawk::query_ptr& query ) QVariantMap m; m.insert( "_msgtype", "rq" ); - m.insert( "resultHint", query->resultHint() ); - if ( query->isFullTextQuery() ) { m.insert( "fulltext", query->fullTextQuery() ); @@ -355,6 +353,9 @@ ScriptResolver::resolve( const Tomahawk::query_ptr& query ) m.insert( "artist", query->artist() ); m.insert( "track", query->track() ); m.insert( "qid", query->id() ); + + if ( !query->resultHint().isEmpty() ) + m.insert( "resultHint", query->resultHint() ); } const QByteArray msg = m_serializer.serialize( QVariant( m ) ); diff --git a/src/libtomahawk/utils/SpotifyParser.cpp b/src/libtomahawk/utils/SpotifyParser.cpp index e80db77ae..d312934c2 100644 --- a/src/libtomahawk/utils/SpotifyParser.cpp +++ b/src/libtomahawk/utils/SpotifyParser.cpp @@ -236,7 +236,7 @@ SpotifyParser::spotifyBrowseFinished() continue; tLog() << "Setting resulthint to " << trackResult.value( "trackuri" ); - q->setResultHint( trackResult.value("trackuri").toString() ); + q->setResultHint( trackResult.value( "trackuri" ).toString() ); m_tracks << q; } @@ -302,8 +302,8 @@ SpotifyParser::spotifyTrackLookupFinished() Tomahawk::query_ptr q = Tomahawk::Query::get( artist, title, album, uuid(), m_trackMode ); if ( !q.isNull() ) { - tLog() << "Setting resulthint to " << t.value( "trackuri" ); - q->setResultHint( t.value("trackuri").toString() ); + q->setResultHint( t.value( "trackuri" ).toString() ); + m_tracks << q; } }