mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-13 20:39:57 +01:00
Fix some bugs in ze last.fm account
This commit is contained in:
parent
f4c92793e6
commit
91546d0684
@ -192,7 +192,7 @@ Account::types() const
|
||||
types |= SipType;
|
||||
if ( m_types.contains( "ResolverType" ) )
|
||||
types |= ResolverType;
|
||||
if ( m_types.contains( "StatusPushTypeType" ) )
|
||||
if ( m_types.contains( "StatusPushType" ) )
|
||||
types |= StatusPushType;
|
||||
|
||||
return types;
|
||||
|
@ -175,7 +175,7 @@ LastFmAccount::password() const
|
||||
void
|
||||
LastFmAccount::setPassword( const QString& password )
|
||||
{
|
||||
QVariantHash creds;
|
||||
QVariantHash creds = credentials();
|
||||
creds[ "password" ] = password;
|
||||
setCredentials( creds );
|
||||
}
|
||||
@ -190,7 +190,7 @@ LastFmAccount::sessionKey() const
|
||||
void
|
||||
LastFmAccount::setSessionKey( const QString& sessionkey )
|
||||
{
|
||||
QVariantHash creds;
|
||||
QVariantHash creds = credentials();
|
||||
creds[ "sessionkey" ] = sessionkey;
|
||||
setCredentials( creds );
|
||||
}
|
||||
@ -206,7 +206,7 @@ LastFmAccount::username() const
|
||||
void
|
||||
LastFmAccount::setUsername( const QString& username )
|
||||
{
|
||||
QVariantHash creds;
|
||||
QVariantHash creds = credentials();
|
||||
creds[ "username" ] = username;
|
||||
setCredentials( creds );
|
||||
}
|
||||
|
@ -706,14 +706,14 @@ LastFmPlugin::artistImagesReturned()
|
||||
void
|
||||
LastFmPlugin::settingsChanged()
|
||||
{
|
||||
if ( !m_scrobbler && m_account->enabled() )
|
||||
if ( !m_scrobbler && m_account->scrobble() )
|
||||
{ // can simply create the scrobbler
|
||||
lastfm::ws::Username = m_account->username();
|
||||
m_pw = m_account->password();
|
||||
lastfm::ws::Username = m_account->username();
|
||||
m_pw = m_account->password();
|
||||
|
||||
createScrobbler();
|
||||
}
|
||||
else if ( m_scrobbler && !m_account->enabled() )
|
||||
else if ( m_scrobbler && !m_account->scrobble() )
|
||||
{
|
||||
delete m_scrobbler;
|
||||
m_scrobbler = 0;
|
||||
@ -761,7 +761,7 @@ LastFmPlugin::onAuthenticated()
|
||||
m_account->setSessionKey( lastfm::ws::SessionKey.toLatin1() );
|
||||
|
||||
// qDebug() << "Got session key from last.fm";
|
||||
if ( m_account->enabled() )
|
||||
if ( m_account->scrobble() )
|
||||
m_scrobbler = new lastfm::Audioscrobbler( "thk" );
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user