Sayonara Player
Public Member Functions | List of all members
Cover::Fetcher::Base Class Referenceabstract

The CoverFetcherInterface interface. More...

#include <CoverFetcherInterface.h>

Inheritance diagram for Cover::Fetcher::Base:
Cover::Fetcher::Allmusic Cover::Fetcher::Amazon Cover::Fetcher::Audioscrobbler Cover::Fetcher::Discogs Cover::Fetcher::Google Cover::Fetcher::Standard Cover::Fetcher::Yandex

Public Member Functions

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

Detailed Description

The CoverFetcherInterface interface.

Member Function Documentation

◆ album_address()

virtual QString Cover::Fetcher::Base::album_address ( const QString &  artist,
const QString &  album 
) const
virtual

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

Parameters
artistartist name
albumalbum name
Returns

Reimplemented in Cover::Fetcher::Discogs, Cover::Fetcher::Google, Cover::Fetcher::Audioscrobbler, Cover::Fetcher::Allmusic, Cover::Fetcher::Amazon, and Cover::Fetcher::Yandex.

◆ artist_address()

virtual QString Cover::Fetcher::Base::artist_address ( const QString &  artist) const
virtual

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

Parameters
artistartist name
Returns

Reimplemented in Cover::Fetcher::Discogs, Cover::Fetcher::Google, Cover::Fetcher::Allmusic, and Cover::Fetcher::Yandex.

◆ can_fetch_cover_directly()

virtual bool Cover::Fetcher::Base::can_fetch_cover_directly ( ) const
pure virtual

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

Returns

Implemented in Cover::Fetcher::Discogs, Cover::Fetcher::Google, Cover::Fetcher::Standard, Cover::Fetcher::Audioscrobbler, Cover::Fetcher::Allmusic, Cover::Fetcher::Amazon, and Cover::Fetcher::Yandex.

◆ estimated_size()

virtual int Cover::Fetcher::Base::estimated_size ( ) const
pure virtual

get_estimated_size. Rough image size of the CoverFetchInterface

Returns
e.g. 300px

Implemented in Cover::Fetcher::Discogs, Cover::Fetcher::Google, Cover::Fetcher::Allmusic, Cover::Fetcher::Audioscrobbler, Cover::Fetcher::Standard, Cover::Fetcher::Amazon, and Cover::Fetcher::Yandex.

◆ identifier()

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

get name of CoverFetcherInterface like e.g. Discogs

Returns

◆ parse_addresses()

virtual QStringList Cover::Fetcher::Base::parse_addresses ( const QByteArray &  website) const
pure virtual

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

Parameters
websitewebsite data
Returns

Implemented in Cover::Fetcher::Discogs, Cover::Fetcher::Google, Cover::Fetcher::Standard, Cover::Fetcher::Audioscrobbler, Cover::Fetcher::Allmusic, Cover::Fetcher::Amazon, and Cover::Fetcher::Yandex.

◆ search_address()

virtual QString Cover::Fetcher::Base::search_address ( const QString &  str) const
virtual

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

Parameters
strsearch string
Returns

Reimplemented in Cover::Fetcher::Discogs, Cover::Fetcher::Google, Cover::Fetcher::Allmusic, Cover::Fetcher::Amazon, and Cover::Fetcher::Yandex.