SoundCloud service simple search limit is set. (#5738)

SoundCloud search limit it set to 100. Pagination may be added soon. (see SoundCloud HTTP api: https://developers.soundcloud.com/docs/api/guide#pagination)
This commit is contained in:
Rix 2017-05-30 20:17:40 +03:00 committed by John Maguire
parent 322e49d20c
commit 8ff7d5750c
1 changed files with 3 additions and 3 deletions

View File

@ -61,7 +61,7 @@ const char* SoundCloudService::kHomepage = "http://soundcloud.com/";
const int SoundCloudService::kSearchDelayMsec = 400;
const int SoundCloudService::kSongSearchLimit = 100;
const int SoundCloudService::kSongSimpleSearchLimit = 10;
const int SoundCloudService::kSongSimpleSearchLimit = 100;
typedef QPair<QString, QString> Param;
@ -324,7 +324,7 @@ void SoundCloudService::DoSearch() {
ClearSearchResults();
QList<Param> parameters;
parameters << Param("q", pending_search_);
parameters << Param("q", pending_search_) << Param("limit", QString::number(kSongSearchLimit));
QNetworkReply* reply = CreateRequest("tracks", parameters);
const int id = next_pending_search_id_++;
NewClosure(reply, SIGNAL(finished()), this,
@ -353,7 +353,7 @@ void SoundCloudService::ClearSearchResults() {
int SoundCloudService::SimpleSearch(const QString& text) {
QList<Param> parameters;
parameters << Param("q", text);
parameters << Param("q", text) << Param("limit", QString::number(kSongSimpleSearchLimit));
QNetworkReply* reply = CreateRequest("tracks", parameters);
const int id = next_pending_search_id_++;
NewClosure(reply, SIGNAL(finished()), this,