mirror of
https://github.com/clementine-player/Clementine
synced 2025-01-31 03:27:40 +01:00
Increase album search limit in spotify global search.
Fixes issue #3485
This commit is contained in:
parent
b3d5c3e6e2
commit
91233dd8d1
@ -28,6 +28,11 @@
|
|||||||
#include "internet/spotifyservice.h"
|
#include "internet/spotifyservice.h"
|
||||||
#include "playlist/songmimedata.h"
|
#include "playlist/songmimedata.h"
|
||||||
|
|
||||||
|
namespace {
|
||||||
|
const int kSearchSongLimit = 5;
|
||||||
|
const int kSearchAlbumLimit = 20;
|
||||||
|
}
|
||||||
|
|
||||||
SpotifySearchProvider::SpotifySearchProvider(Application* app, QObject* parent)
|
SpotifySearchProvider::SpotifySearchProvider(Application* app, QObject* parent)
|
||||||
: SearchProvider(app, parent),
|
: SearchProvider(app, parent),
|
||||||
server_(NULL),
|
server_(NULL),
|
||||||
@ -78,7 +83,7 @@ void SpotifySearchProvider::SearchAsync(int id, const QString& query) {
|
|||||||
state.tokens_ = TokenizeQuery(query);
|
state.tokens_ = TokenizeQuery(query);
|
||||||
|
|
||||||
const QString query_string = state.tokens_.join(" ");
|
const QString query_string = state.tokens_.join(" ");
|
||||||
s->Search(query_string, 5, 5);
|
s->Search(query_string, kSearchSongLimit, kSearchAlbumLimit);
|
||||||
queries_[query_string] = state;
|
queries_[query_string] = state;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user