diff --git a/src/libtomahawk/accounts/spotify/SpotifyPlaylistUpdater.cpp b/src/libtomahawk/accounts/spotify/SpotifyPlaylistUpdater.cpp index fff1c2f3b..e87530b71 100644 --- a/src/libtomahawk/accounts/spotify/SpotifyPlaylistUpdater.cpp +++ b/src/libtomahawk/accounts/spotify/SpotifyPlaylistUpdater.cpp @@ -1,6 +1,7 @@ /* === This file is part of Tomahawk Player - === * * 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 @@ -731,8 +732,10 @@ SpotifyPlaylistUpdater::variantToQueries( const QVariantList& list ) continue; if ( trackMap.contains( "id" ) ) + { + q->setResultHint( trackMap.value( "id" ).toString() ); q->setProperty( "annotation", trackMap.value( "id" ) ); - + } queries << q; } diff --git a/src/libtomahawk/accounts/spotify/SpotifyPlaylistUpdater.h b/src/libtomahawk/accounts/spotify/SpotifyPlaylistUpdater.h index c2ae2f5fa..a5f46d358 100644 --- a/src/libtomahawk/accounts/spotify/SpotifyPlaylistUpdater.h +++ b/src/libtomahawk/accounts/spotify/SpotifyPlaylistUpdater.h @@ -1,7 +1,7 @@ /* === This file is part of Tomahawk Player - === * * 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 ebfd79672..b1bdbd6e7 100644 --- a/src/libtomahawk/resolvers/ScriptResolver.cpp +++ b/src/libtomahawk/resolvers/ScriptResolver.cpp @@ -341,6 +341,8 @@ 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() ); diff --git a/src/libtomahawk/utils/SpotifyParser.cpp b/src/libtomahawk/utils/SpotifyParser.cpp index 877c811e9..e80db77ae 100644 --- a/src/libtomahawk/utils/SpotifyParser.cpp +++ b/src/libtomahawk/utils/SpotifyParser.cpp @@ -235,6 +235,9 @@ SpotifyParser::spotifyBrowseFinished() if ( q.isNull() ) continue; + tLog() << "Setting resulthint to " << trackResult.value( "trackuri" ); + q->setResultHint( trackResult.value("trackuri").toString() ); + m_tracks << q; } } @@ -298,7 +301,11 @@ 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() ); m_tracks << q; + } } else {