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