1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-03-22 16:59:58 +01:00

Use liblastfm NAC in infosystemworker too, if available

This commit is contained in:
Jeff Mitchell 2011-05-02 10:14:59 -04:00
parent e8be8e95b5
commit 9ed8caf277
2 changed files with 11 additions and 3 deletions

View File

@ -27,6 +27,8 @@
#include "infoplugins/musixmatchplugin.h"
#include "infoplugins/lastfmplugin.h"
#include "lastfm/NetworkAccessManager"
namespace Tomahawk
{
@ -165,7 +167,13 @@ void
InfoSystemWorker::newNam()
{
qDebug() << Q_FUNC_INFO;
QNetworkAccessManager *newNam = new QNetworkAccessManager();
QNetworkAccessManager* newNam;
#ifdef LIBLASTFM_FOUND
newNam = new lastfm::NetworkAccessManager( this );
#else
newNam = new QNetworkAccessManager( this );
#endif
if ( m_nam )
{
delete m_nam;

View File

@ -224,10 +224,10 @@ TomahawkApp::init()
qDebug() << "Setting NAM.";
TomahawkUtils::setNam( lastfm::nam() );
#else
#else
qDebug() << "Setting NAM.";
TomahawkUtils::setNam( new QNetworkAccessManager() );
#endif
#endif
// Set up proxy
//FIXME: This overrides the lastfm proxy above?