1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-03-18 23:09:42 +01:00

Add a last.fm account on fresh config

This commit is contained in:
Leo Franchi 2012-02-24 10:46:46 -06:00
parent d0b6d09255
commit ac42abda7f
2 changed files with 16 additions and 2 deletions

View File

@ -76,8 +76,12 @@ AccountModel::loadData()
if ( AtticaManager::instance()->hasCustomAccountForAttica( content.id() ) )
{
Account* acct = AtticaManager::instance()->customAccountForAttica( content.id() );
m_accounts << new AccountModelNode( acct );
allAccounts.removeAll( acct );
Q_ASSERT( acct );
if ( acct )
{
m_accounts << new AccountModelNode( acct );
allAccounts.removeAll( acct );
}
} else
{
m_accounts << new AccountModelNode( content );

View File

@ -82,6 +82,16 @@ TomahawkSettings::doInitialSetup()
{
// by default we add a local network resolver
addAccount( "sipzeroconf_autocreated" );
// Add a last.fm account for scrobbling and infosystem
const QString accountKey = QString( "lastfmaccount_%1" ).arg( QUuid::createUuid().toString().mid( 1, 8 ) );
addAccount( accountKey );
beginGroup( "accounts/" + accountKey );
setValue( "enabled", false );
setValue( "autoconnect", true );
setValue( "types", QStringList() << "ResolverType" << "StatusPushType" );
endGroup();
}