mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-09 15:47:38 +02:00
* Queue infosystem requests until its ready on startup.
This commit is contained in:
@@ -30,6 +30,7 @@
|
|||||||
#include "utils/TomahawkUtils.h"
|
#include "utils/TomahawkUtils.h"
|
||||||
#include "utils/Logger.h"
|
#include "utils/Logger.h"
|
||||||
#include "utils/PluginLoader.h"
|
#include "utils/PluginLoader.h"
|
||||||
|
#include "utils/Closure.h"
|
||||||
#include "Source.h"
|
#include "Source.h"
|
||||||
|
|
||||||
#include <QCoreApplication>
|
#include <QCoreApplication>
|
||||||
@@ -225,8 +226,15 @@ InfoSystemWorker::getInfo( Tomahawk::InfoSystem::InfoRequestData requestData )
|
|||||||
QList< InfoPluginPtr > providers = determineOrderedMatches( requestData.type );
|
QList< InfoPluginPtr > providers = determineOrderedMatches( requestData.type );
|
||||||
if ( providers.isEmpty() )
|
if ( providers.isEmpty() )
|
||||||
{
|
{
|
||||||
emit info( requestData, QVariant() );
|
// We're not ready yet, retry this request in a bit
|
||||||
checkFinished( requestData );
|
QTimer* timer = new QTimer();
|
||||||
|
timer->setInterval( 500 );
|
||||||
|
timer->setSingleShot( true );
|
||||||
|
NewClosure( timer, SIGNAL( timeout() ), this, SLOT( getInfo( Tomahawk::InfoSystem::InfoRequestData ) ), requestData );
|
||||||
|
timer->start();
|
||||||
|
|
||||||
|
/* emit info( requestData, QVariant() );
|
||||||
|
checkFinished( requestData );*/
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user