![]() |
Sayonara Player
|
#include <AlbumCoverFetchThread.h>
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_cover_location().
Signals | |
| void | sig_next () |
Public Member Functions | |
| AlbumCoverFetchThread (QObject *parent=nullptr) | |
| void | add_data (const QString &hash, const CoverLocation &cl) |
| add_data Add a new album request More... | |
| void | done (bool success) |
| done Should be called when processing of the next cover should take place More... | |
| void | stop () |
| stop Stop the thread | |
| QString | current_hash () const |
| Get the current processed hash valud. More... | |
| CoverLocation | current_cover_location () const |
| Get the curren processed cover location. More... | |
Protected Member Functions | |
| void | run () override |
| void AlbumCoverFetchThread::add_data | ( | const QString & | hash, |
| const CoverLocation & | cl | ||
| ) |
add_data Add a new album request
| hash | hashed album info |
| cl | Cover Location of the album |
| CoverLocation AlbumCoverFetchThread::current_cover_location | ( | ) | const |
Get the curren processed cover location.
| QString AlbumCoverFetchThread::current_hash | ( | ) | const |
Get the current processed hash valud.
| void AlbumCoverFetchThread::done | ( | bool | success | ) |
done Should be called when processing of the next cover should take place
| success | not evalutated |
1.8.13