Sayonara Player
DirectFetcher.h
1 #ifndef DIRECTFETCHER_H
2 #define DIRECTFETCHER_H
3 
4 #include "CoverFetcher.h"
5 #include "Utils/Pimpl.h"
6 
7 namespace Cover::Fetcher
8 {
9  class DirectFetcher :
11  {
12  PIMPL(DirectFetcher)
13 
14  private:
15  QString privateIdentifier() const override;
16 
17  public:
18  DirectFetcher();
19  ~DirectFetcher() override;
20 
21  bool canFetchCoverDirectly() const override;
22  QStringList parseAddresses(const QByteArray& website) const override;
23  QString artistAddress(const QString& artist) const override;
24  QString albumAddress(const QString& artist, const QString& album) const override;
25  QString fulltextSearchAddress(const QString& str) const override;
26  int estimatedSize() const override;
27 
28  void setDirectUrl(const QString& url);
29  };
30 }
31 
32 #endif // DIRECTFETCHER_H
Cover::Fetcher::DirectFetcher::artistAddress
QString artistAddress(const QString &artist) const override
Get the artist search url. This is called if is_artist_supported returns true.
Cover::Fetcher::DirectFetcher::parseAddresses
QStringList parseAddresses(const QByteArray &website) const override
Get addresses from the downloaded website. If can_fetch_cover_directly returns true,...
Cover::Fetcher::DirectFetcher::fulltextSearchAddress
QString fulltextSearchAddress(const QString &str) const override
Get a custom search address This is called if is_search_supported returns true.
Cover::Fetcher::Base
The CoverFetcherInterface interface.
Definition: CoverFetcher.h:35
Cover::Fetcher::DirectFetcher::estimatedSize
int estimatedSize() const override
get_estimated_size. Rough image size of the CoverFetchInterface
Cover::Fetcher::DirectFetcher
Definition: DirectFetcher.h:11
Cover::Fetcher::DirectFetcher::albumAddress
QString albumAddress(const QString &artist, const QString &album) const override
Get the album search url. This is called if is_album_supported returns true.
Cover::Fetcher::DirectFetcher::canFetchCoverDirectly
bool canFetchCoverDirectly() const override
Can the cover be fetched from the adress without starting a two-stage query?