mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-09 07:36:48 +02:00
Add a last.fm account on fresh config
This commit is contained in:
@@ -76,8 +76,12 @@ AccountModel::loadData()
|
|||||||
if ( AtticaManager::instance()->hasCustomAccountForAttica( content.id() ) )
|
if ( AtticaManager::instance()->hasCustomAccountForAttica( content.id() ) )
|
||||||
{
|
{
|
||||||
Account* acct = AtticaManager::instance()->customAccountForAttica( content.id() );
|
Account* acct = AtticaManager::instance()->customAccountForAttica( content.id() );
|
||||||
m_accounts << new AccountModelNode( acct );
|
Q_ASSERT( acct );
|
||||||
allAccounts.removeAll( acct );
|
if ( acct )
|
||||||
|
{
|
||||||
|
m_accounts << new AccountModelNode( acct );
|
||||||
|
allAccounts.removeAll( acct );
|
||||||
|
}
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
m_accounts << new AccountModelNode( content );
|
m_accounts << new AccountModelNode( content );
|
||||||
|
@@ -82,6 +82,16 @@ TomahawkSettings::doInitialSetup()
|
|||||||
{
|
{
|
||||||
// by default we add a local network resolver
|
// by default we add a local network resolver
|
||||||
addAccount( "sipzeroconf_autocreated" );
|
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();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user