mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-20 07:49:42 +01:00
TWK-750: Properly check if last.fm was enabled during accounts migration
This commit is contained in:
parent
c88058358e
commit
60d11db923
@ -341,7 +341,16 @@ TomahawkSettings::doUpgrade( int oldVersion, int newVersion )
|
||||
const QString lfmPassword = value( "lastfm/password" ).toString();
|
||||
const bool scrobble = value( "lastfm/enablescrobbling", false ).toBool();
|
||||
beginGroup( "accounts/" + accountKey );
|
||||
setValue( "enabled", enabledResolvers.contains( "lastfm" ) == true );
|
||||
bool hasLastFmEnabled = false;
|
||||
foreach ( const QString& r, enabledResolvers )
|
||||
{
|
||||
if ( r.contains( "lastfm" ) )
|
||||
{
|
||||
hasLastFmEnabled = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
setValue( "enabled", hasLastFmEnabled );
|
||||
setValue( "autoconnect", true );
|
||||
setValue( "types", QStringList() << "ResolverType" << "StatusPushType" );
|
||||
QVariantHash credentials;
|
||||
|
Loading…
x
Reference in New Issue
Block a user