Sayonara Player
Public Member Functions | List of all members
Cover::Fetcher::DirectFetcher Class Reference
Inheritance diagram for Cover::Fetcher::DirectFetcher:
Cover::Fetcher::Base

Public Member Functions

bool canFetchCoverDirectly () const override
 Can the cover be fetched from the adress without starting a two-stage query? More...
 
QStringList parseAddresses (const QByteArray &website) const override
 Get addresses from the downloaded website. If can_fetch_cover_directly returns true, this method is not called. More...
 
QString artistAddress (const QString &artist) const override
 Get the artist search url. This is called if is_artist_supported returns true. More...
 
QString albumAddress (const QString &artist, const QString &album) const override
 Get the album search url. This is called if is_album_supported returns true. More...
 
QString fulltextSearchAddress (const QString &str) const override
 Get a custom search address This is called if is_search_supported returns true. More...
 
int estimatedSize () const override
 get_estimated_size. Rough image size of the CoverFetchInterface More...
 
void setDirectUrl (const QString &url)
 
virtual QString identifier () const final
 get name of CoverFetcherInterface like e.g. Discogs More...
 

Member Function Documentation

◆ albumAddress()

QString Cover::Fetcher::DirectFetcher::albumAddress ( const QString &  artist,
const QString &  album 
) const
overridevirtual

Get the album search url. This is called if is_album_supported returns true.

Parameters
artistartist name
albumalbum name
Returns

Reimplemented from Cover::Fetcher::Base.

◆ artistAddress()

QString Cover::Fetcher::DirectFetcher::artistAddress ( const QString &  artist) const
overridevirtual

Get the artist search url. This is called if is_artist_supported returns true.

Parameters
artistartist name
Returns

Reimplemented from Cover::Fetcher::Base.

◆ canFetchCoverDirectly()

bool Cover::Fetcher::DirectFetcher::canFetchCoverDirectly ( ) const
overridevirtual

Can the cover be fetched from the adress without starting a two-stage query?

Returns

Implements Cover::Fetcher::Base.

◆ estimatedSize()

int Cover::Fetcher::DirectFetcher::estimatedSize ( ) const
overridevirtual

get_estimated_size. Rough image size of the CoverFetchInterface

Returns
e.g. 300px

Implements Cover::Fetcher::Base.

◆ fulltextSearchAddress()

QString Cover::Fetcher::DirectFetcher::fulltextSearchAddress ( const QString &  str) const
overridevirtual

Get a custom search address This is called if is_search_supported returns true.

Parameters
strsearch string
Returns

Reimplemented from Cover::Fetcher::Base.

◆ identifier()

virtual QString Cover::Fetcher::Base::identifier ( ) const
finalvirtualinherited

get name of CoverFetcherInterface like e.g. Discogs

Returns

◆ parseAddresses()

QStringList Cover::Fetcher::DirectFetcher::parseAddresses ( const QByteArray &  website) const
overridevirtual

Get addresses from the downloaded website. If can_fetch_cover_directly returns true, this method is not called.

Parameters
websitewebsite data
Returns

Implements Cover::Fetcher::Base.