1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-11 16:44:05 +02:00

Minor cleanup

This commit is contained in:
Leo Franchi
2012-07-19 08:53:44 -04:00
parent 3f9046d61d
commit f4f5750cd4
3 changed files with 7 additions and 5 deletions

View File

@@ -2,6 +2,7 @@
* *
* Copyright 2010-2012, Leo Franchi <lfranchi@kde.org> * Copyright 2010-2012, Leo Franchi <lfranchi@kde.org>
* Copyright 2012, Hugo Lindström <hugolm84@gmail.com> * Copyright 2012, Hugo Lindström <hugolm84@gmail.com>
*
* Tomahawk is free software: you can redistribute it and/or modify * Tomahawk is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or * the Free Software Foundation, either version 3 of the License, or

View File

@@ -341,8 +341,6 @@ ScriptResolver::resolve( const Tomahawk::query_ptr& query )
QVariantMap m; QVariantMap m;
m.insert( "_msgtype", "rq" ); m.insert( "_msgtype", "rq" );
m.insert( "resultHint", query->resultHint() );
if ( query->isFullTextQuery() ) if ( query->isFullTextQuery() )
{ {
m.insert( "fulltext", query->fullTextQuery() ); m.insert( "fulltext", query->fullTextQuery() );
@@ -355,6 +353,9 @@ ScriptResolver::resolve( const Tomahawk::query_ptr& query )
m.insert( "artist", query->artist() ); m.insert( "artist", query->artist() );
m.insert( "track", query->track() ); m.insert( "track", query->track() );
m.insert( "qid", query->id() ); m.insert( "qid", query->id() );
if ( !query->resultHint().isEmpty() )
m.insert( "resultHint", query->resultHint() );
} }
const QByteArray msg = m_serializer.serialize( QVariant( m ) ); const QByteArray msg = m_serializer.serialize( QVariant( m ) );

View File

@@ -236,7 +236,7 @@ SpotifyParser::spotifyBrowseFinished()
continue; continue;
tLog() << "Setting resulthint to " << trackResult.value( "trackuri" ); tLog() << "Setting resulthint to " << trackResult.value( "trackuri" );
q->setResultHint( trackResult.value("trackuri").toString() ); q->setResultHint( trackResult.value( "trackuri" ).toString() );
m_tracks << q; m_tracks << q;
} }
@@ -302,8 +302,8 @@ SpotifyParser::spotifyTrackLookupFinished()
Tomahawk::query_ptr q = Tomahawk::Query::get( artist, title, album, uuid(), m_trackMode ); Tomahawk::query_ptr q = Tomahawk::Query::get( artist, title, album, uuid(), m_trackMode );
if ( !q.isNull() ) 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; m_tracks << q;
} }
} }