mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-04-22 00:42:04 +02:00
* Respond to pings from external resolver.
This commit is contained in:
parent
2fd970d24d
commit
a9e0c3c460
src/libtomahawk/resolvers
@ -255,7 +255,11 @@ ScriptResolver::handleMsg( const QByteArray& msg )
|
||||
setupConfWidget( m );
|
||||
return;
|
||||
}
|
||||
|
||||
else if ( msgtype == "status" )
|
||||
{
|
||||
sendStatus();
|
||||
return;
|
||||
}
|
||||
else if ( msgtype == "results" )
|
||||
{
|
||||
const QString qid = m.value( "qid" ).toString();
|
||||
@ -333,6 +337,7 @@ ScriptResolver::cmdExited( int code, QProcess::ExitStatus status )
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
ScriptResolver::resolve( const Tomahawk::query_ptr& query )
|
||||
{
|
||||
@ -358,6 +363,16 @@ ScriptResolver::resolve( const Tomahawk::query_ptr& query )
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
ScriptResolver::sendStatus()
|
||||
{
|
||||
QVariantMap msg;
|
||||
msg[ "_msgtype" ] = "status";
|
||||
msg[ "_status" ] = 1;
|
||||
sendMessage( msg );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
ScriptResolver::doSetup( const QVariantMap& m )
|
||||
{
|
||||
|
@ -77,6 +77,7 @@ private:
|
||||
void sendMsg( const QByteArray& msg );
|
||||
void doSetup( const QVariantMap& m );
|
||||
void setupConfWidget( const QVariantMap& m );
|
||||
void sendStatus();
|
||||
|
||||
void startProcess();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user