Don't use Discogs if fetching all album covers because of trottling.

This commit is contained in:
Jonas Kvinge
2018-03-05 21:05:30 +01:00
parent 887e045a63
commit 1aabdc9b8b
20 changed files with 69 additions and 58 deletions

View File

@@ -57,7 +57,9 @@ quint64 AlbumCoverFetcher::FetchAlbumCover(const QString &artist, const QString
}
quint64 AlbumCoverFetcher::SearchForCovers(const QString &artist, const QString &album) {
fetchall_ = false;
QString album2(album);
album2 = album2.remove(QRegExp(" ?-? ?(\\(|\\[)(Disc|CD)? ?[0-9](\\)|\\])$"));
@@ -105,9 +107,9 @@ void AlbumCoverFetcher::StartRequests() {
CoverSearchRequest request = queued_requests_.dequeue();
// search objects are this fetcher's children so worst case scenario - they get
// deleted with it
// search objects are this fetcher's children so worst case scenario - they get deleted with it
AlbumCoverFetcherSearch *search = new AlbumCoverFetcherSearch(request, network_, this);
search->fetchall_ = fetchall_;
active_requests_.insert(request.id, search);
connect(search, SIGNAL(SearchFinished(quint64, CoverSearchResults)), SLOT(SingleSearchFinished(quint64, CoverSearchResults)));