mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-24 09:49:42 +01:00
Fix slow network causing multiple spotify accounts to show up
This commit is contained in:
parent
b308212214
commit
e91d9e55f6
@ -97,16 +97,24 @@ SpotifyAccount::init()
|
||||
setAccountFriendlyName( "Spotify" );
|
||||
setAccountServiceName( "spotify" );
|
||||
|
||||
AtticaManager::instance()->registerCustomAccount( s_resolverId, this );
|
||||
qRegisterMetaType< Tomahawk::Accounts::SpotifyPlaylistInfo* >( "Tomahawk::Accounts::SpotifyPlaylist*" );
|
||||
|
||||
if ( !AtticaManager::instance()->resolversLoaded() )
|
||||
{
|
||||
// If we're still waiting to load, wait for the attica resolvers to come down the pipe
|
||||
connect( AtticaManager::instance(), SIGNAL( resolversLoaded( Attica::Content::List ) ), this, SLOT( init() ), Qt::UniqueConnection );
|
||||
return;
|
||||
connect( AtticaManager::instance(), SIGNAL( resolversLoaded( Attica::Content::List ) ), this, SLOT( delayedInit() ), Qt::UniqueConnection );
|
||||
}
|
||||
else
|
||||
{
|
||||
delayedInit();
|
||||
}
|
||||
}
|
||||
|
||||
qRegisterMetaType< Tomahawk::Accounts::SpotifyPlaylistInfo* >( "Tomahawk::Accounts::SpotifyPlaylist*" );
|
||||
|
||||
AtticaManager::instance()->registerCustomAccount( s_resolverId, this );
|
||||
void
|
||||
SpotifyAccount::delayedInit()
|
||||
{
|
||||
|
||||
connect( AtticaManager::instance(), SIGNAL( resolverInstalled( QString ) ), this, SLOT( resolverInstalled( QString ) ) );
|
||||
|
||||
|
@ -118,10 +118,11 @@ private slots:
|
||||
void startPlaylistSyncWithPlaylist( const QString& msgType, const QVariantMap& msg );
|
||||
void playlistCreated( const QString& msgType, const QVariantMap& msg );
|
||||
|
||||
void init();
|
||||
void delayedInit();
|
||||
void hookupAfterDeletion( bool autoEnable );
|
||||
|
||||
private:
|
||||
void init();
|
||||
bool checkForResolver();
|
||||
void hookupResolver();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user