mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-11 00:24:12 +02:00
Send resulthint when we have it
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
|
||||
*
|
||||
* Copyright 2010-2012, Leo Franchi <lfranchi@kde.org>
|
||||
* Copyright 2012, Hugo Lindström <hugolm84@gmail.com>
|
||||
*
|
||||
* 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;
|
||||
}
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
|
||||
*
|
||||
* Copyright 2010-2012, Leo Franchi <lfranchi@kde.org>
|
||||
*
|
||||
* Copyright 2012, Hugo Lindström <hugolm84@gmail.com>
|
||||
* 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
|
||||
|
@@ -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() );
|
||||
|
@@ -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
|
||||
{
|
||||
|
Reference in New Issue
Block a user