mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-05 05:37:29 +02:00
TWK-750: Properly check if last.fm was enabled during accounts migration
This commit is contained in:
@@ -341,7 +341,16 @@ TomahawkSettings::doUpgrade( int oldVersion, int newVersion )
|
|||||||
const QString lfmPassword = value( "lastfm/password" ).toString();
|
const QString lfmPassword = value( "lastfm/password" ).toString();
|
||||||
const bool scrobble = value( "lastfm/enablescrobbling", false ).toBool();
|
const bool scrobble = value( "lastfm/enablescrobbling", false ).toBool();
|
||||||
beginGroup( "accounts/" + accountKey );
|
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( "autoconnect", true );
|
||||||
setValue( "types", QStringList() << "ResolverType" << "StatusPushType" );
|
setValue( "types", QStringList() << "ResolverType" << "StatusPushType" );
|
||||||
QVariantHash credentials;
|
QVariantHash credentials;
|
||||||
|
Reference in New Issue
Block a user