mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-01 03:40:16 +02:00
Fix lastfm infoplugin for usage without account
This commit is contained in:
@@ -65,13 +65,6 @@ LastFmInfoPlugin::init()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
lastfm::ws::ApiKey = "7194b85b6d1f424fe1668173a78c0c4a";
|
|
||||||
lastfm::ws::SharedSecret = "ba80f1df6d27ae63e9cb1d33ccf2052f";
|
|
||||||
lastfm::ws::Username = m_account.data()->username();
|
|
||||||
lastfm::setNetworkAccessManager( Tomahawk::Utils::nam() );
|
|
||||||
|
|
||||||
m_pw = m_account.data()->password();
|
|
||||||
|
|
||||||
//HACK work around a bug in liblastfm---it doesn't create its config dir, so when it
|
//HACK work around a bug in liblastfm---it doesn't create its config dir, so when it
|
||||||
// tries to write the track cache, it fails silently. until we have a fixed version, do this
|
// tries to write the track cache, it fails silently. until we have a fixed version, do this
|
||||||
// code taken from Amarok (src/services/lastfm/ScrobblerAdapter.cpp)
|
// code taken from Amarok (src/services/lastfm/ScrobblerAdapter.cpp)
|
||||||
@@ -86,6 +79,17 @@ LastFmInfoPlugin::init()
|
|||||||
|
|
||||||
m_badUrls << QUrl( "http://cdn.last.fm/flatness/catalogue/noimage" );
|
m_badUrls << QUrl( "http://cdn.last.fm/flatness/catalogue/noimage" );
|
||||||
|
|
||||||
|
|
||||||
|
lastfm::ws::ApiKey = "7194b85b6d1f424fe1668173a78c0c4a";
|
||||||
|
lastfm::ws::SharedSecret = "ba80f1df6d27ae63e9cb1d33ccf2052f";
|
||||||
|
lastfm::setNetworkAccessManager( Tomahawk::Utils::nam() );
|
||||||
|
|
||||||
|
if ( !m_account.isNull() )
|
||||||
|
{
|
||||||
|
lastfm::ws::Username = m_account->username();
|
||||||
|
m_pw = m_account->password();
|
||||||
|
}
|
||||||
|
|
||||||
QTimer::singleShot( 0, this, SLOT( settingsChanged() ) );
|
QTimer::singleShot( 0, this, SLOT( settingsChanged() ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user