1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-04-22 00:42:04 +02:00

Add version to all request urls

This commit is contained in:
Hugo Lindström 2012-11-20 20:19:38 +01:00
parent 8d5e3af4f6
commit 5b245ddcd3

@ -208,12 +208,10 @@ NewReleasesPlugin::notInCacheSlot( InfoStringHash criteria, InfoRequestData requ
void
NewReleasesPlugin::fetchNRSourcesList( bool fetchOnlySourcesList )
{
QUrl url = QUrl ( QString ( CHART_URL "newreleases" ) );
QUrl url = QUrl ( QString ( CHART_URL "newreleases?version=%1" ).arg( TomahawkUtils::appFriendlyVersion() ) );
QNetworkReply* reply = TomahawkUtils::nam()->get ( QNetworkRequest ( url ) );
reply->setProperty( "only_source_list", fetchOnlySourcesList );
tDebug() << "fetching:" << url;
connect ( reply, SIGNAL ( finished() ), SLOT ( nrSourcesList() ) );
@ -276,7 +274,7 @@ void
NewReleasesPlugin::fetchNR( InfoRequestData requestData, const QString& source, const QString& nr_id )
{
/// Fetch the chart, we need source and id
QUrl url = QUrl ( QString ( CHART_URL "newreleases/%1/%2" ).arg ( source ).arg ( nr_id ) );
QUrl url = QUrl ( QString ( CHART_URL "newreleases/%1/%2?version=%3" ).arg ( source ).arg ( nr_id ).arg( TomahawkUtils::appFriendlyVersion() ) );
tDebug ( LOGVERBOSE ) << Q_FUNC_INFO << "fetching: " << url;
QNetworkReply* reply = TomahawkUtils::nam()->get ( QNetworkRequest ( url ) );