mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-20 15:59:42 +01:00
Fix catalog init properly
This commit is contained in:
parent
2d31de245f
commit
891692d914
@ -72,6 +72,12 @@ EchonestFactory::typeSelectors() const
|
||||
|
||||
CatalogManager::CatalogManager( QObject* parent )
|
||||
: QObject( parent )
|
||||
{
|
||||
connect( SourceList::instance(), SIGNAL( ready() ), this, SLOT( init() ) );
|
||||
}
|
||||
|
||||
void
|
||||
CatalogManager::init()
|
||||
{
|
||||
connect( EchonestCatalogSynchronizer::instance(), SIGNAL( knownCatalogsChanged() ), this, SLOT( doCatalogUpdate() ) );
|
||||
connect( SourceList::instance(), SIGNAL( ready() ), this, SLOT( doCatalogUpdate() ) );
|
||||
|
@ -46,6 +46,7 @@ signals:
|
||||
void catalogsUpdated();
|
||||
|
||||
private slots:
|
||||
void init();
|
||||
void doCatalogUpdate();
|
||||
void collectionAttributes( const PairList& );
|
||||
|
||||
|
@ -181,7 +181,7 @@ TomahawkApp::init()
|
||||
new Pipeline( this );
|
||||
|
||||
m_servent = QWeakPointer<Servent>( new Servent( this ) );
|
||||
connect( m_servent.data(), SIGNAL( ready() ), SLOT( serventReady() ) );
|
||||
connect( m_servent.data(), SIGNAL( ready() ), SLOT( initSIP() ) );
|
||||
|
||||
tDebug() << "Init Database.";
|
||||
initDatabase();
|
||||
@ -219,6 +219,8 @@ TomahawkApp::init()
|
||||
Echonest::Config::instance()->setAPIKey( "JRIHWEP6GPOER2QQ6" );
|
||||
Echonest::Config::instance()->setNetworkAccessManager( TomahawkUtils::nam() );
|
||||
|
||||
EchonestGenerator::setupCatalogs();
|
||||
|
||||
#ifndef TOMAHAWK_HEADLESS
|
||||
if ( !m_headless )
|
||||
{
|
||||
@ -499,14 +501,6 @@ TomahawkApp::initServent()
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
TomahawkApp::serventReady()
|
||||
{
|
||||
EchonestGenerator::setupCatalogs();
|
||||
|
||||
initSIP();
|
||||
}
|
||||
|
||||
void
|
||||
TomahawkApp::initSIP()
|
||||
{
|
||||
|
@ -95,12 +95,11 @@ public slots:
|
||||
|
||||
private slots:
|
||||
void initServent();
|
||||
void serventReady();
|
||||
void initSIP();
|
||||
|
||||
void spotifyApiCheckFinished();
|
||||
|
||||
private:
|
||||
void initSIP();
|
||||
void registerMetaTypes();
|
||||
|
||||
void printHelp();
|
||||
|
Loading…
x
Reference in New Issue
Block a user