This class organizes requests for new Covers for the AlbumCoverView. When looking for covers, not all requests should be fired simultaneously, so there should be a buffer assuring that covers are found one by one. Albums are organized by hashes, each album has a CoverLocation. A new request is added to the queue by calling add_data(). A new request is handled BEFORE old requests. The thread is locked until the done() function is called. The thread emits the signal sig_next(). The cover location and the hash which should be processed next can be fetched by current_hash() and current_coverLocation().
More...
#include <AlbumCoverFetchThread.h>
|
| AlbumCoverFetchThread (QObject *parent=nullptr) |
|
void | addAlbum (const Album &album) |
| add_data Add a new album request More...
|
|
bool | checkAlbum (const QString &hash) |
| check if album is already processed or about to be processed in the future More...
|
|
int | lookupsReady () const |
|
int | queuedHashes () const |
|
int | unprocessedHashes () const |
|
HashLocationPair | takeCurrentLookup () |
|
void | stop () |
| stop Stop the thread
|
|
void | clear () |
|
void | removeHash (const Hash &hash) |
|
|
static Hash | getHash (const Album &album) |
|
This class organizes requests for new Covers for the AlbumCoverView. When looking for covers, not all requests should be fired simultaneously, so there should be a buffer assuring that covers are found one by one. Albums are organized by hashes, each album has a CoverLocation. A new request is added to the queue by calling add_data(). A new request is handled BEFORE old requests. The thread is locked until the done() function is called. The thread emits the signal sig_next(). The cover location and the hash which should be processed next can be fetched by current_hash() and current_coverLocation().
◆ addAlbum()
void Library::AlbumCoverFetchThread::addAlbum |
( |
const Album & |
album | ) |
|
add_data Add a new album request
- Parameters
-
hash | hashed album info |
cl | Cover Location of the album |
◆ checkAlbum()
bool Library::AlbumCoverFetchThread::checkAlbum |
( |
const QString & |
hash | ) |
|
check if album is already processed or about to be processed in the future
- Parameters
-
- Returns