mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-19 23:39:42 +01:00
* Quietened up a bit.
This commit is contained in:
parent
c850fa3520
commit
e536157a4f
@ -45,11 +45,6 @@ LastFmPlugin::LastFmPlugin()
|
||||
m_supportedGetTypes << InfoAlbumCoverArt << InfoArtistImages << InfoArtistSimilars << InfoArtistSongs << InfoChart << InfoChartCapabilities;
|
||||
m_supportedPushTypes << InfoSubmitScrobble << InfoSubmitNowPlaying << InfoLove << InfoUnLove;
|
||||
|
||||
/*
|
||||
Your API Key is 7194b85b6d1f424fe1668173a78c0c4a
|
||||
Your secret is ba80f1df6d27ae63e9cb1d33ccf2052f
|
||||
*/
|
||||
|
||||
// Flush session key cache
|
||||
TomahawkSettings::instance()->setLastFmSessionKey( QByteArray() );
|
||||
|
||||
@ -386,9 +381,7 @@ LastFmPlugin::notInCacheSlot( QHash<QString, QString> criteria, Tomahawk::InfoSy
|
||||
}
|
||||
|
||||
}
|
||||
tDebug() << "LastFmPlugin: InfoChart not in cache, fetching";
|
||||
QMap<QString, QString> args;
|
||||
tDebug() << "LastFmPlugin: " << "args chart_id" << criteria["chart_id"];
|
||||
args["method"] = criteria["chart_id"];
|
||||
args["limit"] = "100";
|
||||
QNetworkReply* reply = lastfm::ws::get(args);
|
||||
@ -422,8 +415,6 @@ LastFmPlugin::notInCacheSlot( QHash<QString, QString> criteria, Tomahawk::InfoSy
|
||||
c[ "label" ] = tr( "Hyped Artists" );
|
||||
artist_charts.append( c );
|
||||
|
||||
|
||||
|
||||
QVariantMap charts;
|
||||
charts.insert( "Tracks", QVariant::fromValue< QList< InfoStringHash > >( track_charts ) );
|
||||
charts.insert( "Artists", QVariant::fromValue< QList< InfoStringHash > >( artist_charts ) );
|
||||
@ -431,7 +422,6 @@ LastFmPlugin::notInCacheSlot( QHash<QString, QString> criteria, Tomahawk::InfoSy
|
||||
QVariantMap result;
|
||||
result.insert( "Last.fm", QVariant::fromValue<QVariantMap>( charts ) );
|
||||
|
||||
tDebug() << "LASTFM RETURNING CHART LIST!";
|
||||
emit info( requestData, result );
|
||||
return;
|
||||
}
|
||||
@ -523,7 +513,6 @@ LastFmPlugin::similarArtistsReturned()
|
||||
void
|
||||
LastFmPlugin::chartReturned()
|
||||
{
|
||||
tDebug() << "LastfmPlugin: InfoChart data returned!";
|
||||
QNetworkReply* reply = qobject_cast<QNetworkReply*>( sender() );
|
||||
|
||||
QVariantMap returnedData;
|
||||
@ -541,7 +530,6 @@ LastFmPlugin::chartReturned()
|
||||
pair[ "track" ] = t.title();
|
||||
top_tracks << pair;
|
||||
}
|
||||
tDebug() << "LastFmPlugin:" << "\tgot " << top_tracks.size() << " tracks";
|
||||
returnedData["tracks"] = QVariant::fromValue( top_tracks );
|
||||
returnedData["type"] = "tracks";
|
||||
|
||||
@ -550,7 +538,6 @@ LastFmPlugin::chartReturned()
|
||||
{
|
||||
QList<lastfm::Artist> list = lastfm::Artist::list( reply );
|
||||
QStringList al;
|
||||
tDebug() << "LastFmPlugin:"<< "\tgot " << list.size() << " artists";
|
||||
foreach ( const lastfm::Artist& a, list )
|
||||
al << a.toString();
|
||||
returnedData["artists"] = al;
|
||||
@ -558,7 +545,7 @@ LastFmPlugin::chartReturned()
|
||||
}
|
||||
else
|
||||
{
|
||||
tDebug() << "LastfmPlugin:: got non tracks and non artists";
|
||||
tDebug() << Q_FUNC_INFO << "got non tracks and non artists";
|
||||
}
|
||||
|
||||
Tomahawk::InfoSystem::InfoRequestData requestData = reply->property( "requestData" ).value< Tomahawk::InfoSystem::InfoRequestData >();
|
||||
|
@ -312,10 +312,8 @@ NetworkProxyFactory::NetworkProxyFactory( const NetworkProxyFactory& other )
|
||||
QList< QNetworkProxy >
|
||||
NetworkProxyFactory::proxyForQuery( const QNetworkProxyQuery& query )
|
||||
{
|
||||
tDebug() << Q_FUNC_INFO;
|
||||
TomahawkUtils::NetworkProxyFactory* proxyFactory = TomahawkUtils::proxyFactory();
|
||||
QList< QNetworkProxy > proxies = proxyFactory->queryProxy( query );
|
||||
tDebug() << Q_FUNC_INFO << " proxies size = " << proxies.size();
|
||||
return proxies;
|
||||
}
|
||||
|
||||
@ -323,7 +321,6 @@ NetworkProxyFactory::proxyForQuery( const QNetworkProxyQuery& query )
|
||||
QList< QNetworkProxy >
|
||||
NetworkProxyFactory::queryProxy( const QNetworkProxyQuery& query )
|
||||
{
|
||||
tDebug() << Q_FUNC_INFO << "query.peerHostName() = " << query.peerHostName() << ", m_noProxyHosts = " << m_noProxyHosts;
|
||||
QList< QNetworkProxy > proxies;
|
||||
QString hostname = query.peerHostName();
|
||||
if ( m_proxy.hostName().isEmpty() || hostname.isEmpty() || m_noProxyHosts.contains( hostname ) || TomahawkSettings::instance()->proxyType() == QNetworkProxy::NoProxy )
|
||||
@ -331,7 +328,6 @@ NetworkProxyFactory::queryProxy( const QNetworkProxyQuery& query )
|
||||
else
|
||||
proxies << m_proxy << QNetworkProxy( QNetworkProxy::DefaultProxy ) << QNetworkProxy( QNetworkProxy::NoProxy );
|
||||
|
||||
tDebug() << Q_FUNC_INFO << " proxies size = " << proxies.size();
|
||||
return proxies;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user