Fix discogs album cover fetcher

This commit is contained in:
Jonas Kvinge
2018-03-17 14:28:45 +01:00
parent c3f0d27165
commit dadd5e05a3
8 changed files with 75 additions and 140 deletions

View File

@@ -51,6 +51,9 @@ struct CoverSearchRequest {
// is this only a search request or should we also fetch the first cover that's found?
bool search;
// is the request part of fetchall (fetching all missing covers)
bool fetchall;
};
// This structure represents a single result of some album's cover search request.
@@ -84,11 +87,9 @@ class AlbumCoverFetcher : public QObject {
static const int kMaxConcurrentRequests;
quint64 SearchForCovers(const QString &artist, const QString &album);
quint64 FetchAlbumCover(const QString &artist, const QString &album);
quint64 FetchAlbumCover(const QString &artist, const QString &album, bool fetchall);
void Clear();
bool fetchall_ = false;
signals:
void AlbumCoverFetched(quint64, const QImage &cover, const CoverSearchStatistics &statistics);