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

The CoverFetcherInterface interface. More...

#include <CoverFetcher.h>

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

Public Member Functions

virtual bool canFetchCoverDirectly () const =0
 Can the cover be fetched from the adress without starting a two-stage query? More...
 
virtual QStringList parseAddresses (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 artistAddress (const QString &artist) const
 Get the artist search url. This is called if is_artist_supported returns true. More...
 
virtual QString albumAddress (const QString &artist, const QString &album) const
 Get the album search url. This is called if is_album_supported returns true. More...
 
virtual QString fulltextSearchAddress (const QString &str) const
 Get a custom search address This is called if is_search_supported returns true. More...
 
virtual QString radioSearchAddress (const QString &stationName, const QString &stationUrl) const
 
virtual int estimatedSize () const =0
 get_estimated_size. Rough image size of the CoverFetchInterface More...
 
virtual bool isWebserviceFetcher () const
 

Protected Member Functions

QString searchStringFromRadioStation (const QString &stationName, const QString &stationUrl) const
 

Detailed Description

The CoverFetcherInterface interface.

Member Function Documentation

◆ albumAddress()

virtual QString Cover::Fetcher::Base::albumAddress ( 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::Allmusic, Cover::Fetcher::Amazon, Cover::Fetcher::Audioscrobbler, Cover::Fetcher::DirectFetcher, Cover::Fetcher::Discogs, Cover::Fetcher::Google, and Cover::Fetcher::Yandex.

◆ artistAddress()

virtual QString Cover::Fetcher::Base::artistAddress ( 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::Allmusic, Cover::Fetcher::DirectFetcher, Cover::Fetcher::Discogs, Cover::Fetcher::Google, and Cover::Fetcher::Yandex.

◆ canFetchCoverDirectly()

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

◆ estimatedSize()

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

◆ fulltextSearchAddress()

virtual QString Cover::Fetcher::Base::fulltextSearchAddress ( 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::Website, Cover::Fetcher::Amazon, Cover::Fetcher::Allmusic, Cover::Fetcher::DirectFetcher, Cover::Fetcher::Discogs, Cover::Fetcher::Google, and Cover::Fetcher::Yandex.

◆ identifier()

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

get name of CoverFetcherInterface like e.g. Discogs

Returns

◆ parseAddresses()

virtual QStringList Cover::Fetcher::Base::parseAddresses ( 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::Allmusic, Cover::Fetcher::Amazon, Cover::Fetcher::Audioscrobbler, Cover::Fetcher::DirectFetcher, Cover::Fetcher::Discogs, Cover::Fetcher::Google, Cover::Fetcher::Website, and Cover::Fetcher::Yandex.