Sayonara Player
Public Member Functions | List of all members
LFMCoverFetcher Class Reference

#include <LFMCoverFetcher.h>

Detailed Description

The LFMCoverFetcher class. See CoverFetcherInterface.

Public Member Functions

bool can_fetch_cover_directly () const override
 Can the cover be fetched from the adress without starting a two-stage query? More...
 
QStringList calc_addresses_from_website (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 get_artist_address (const QString &artist) const override
 Get the artist search url. This is called if is_artist_supported returns true. More...
 
QString get_album_address (const QString &artist, const QString &album) const override
 Get the album search url. This is called if is_album_supported returns true. More...
 
QString get_search_address (const QString &str) const override
 Get a custom search address This is called if is_search_supported returns true. More...
 
bool is_search_supported () const override
 Is text search supported. More...
 
bool is_album_supported () const override
 is album search supported More...
 
bool is_artist_supported () const override
 is artist search supported More...
 
int get_estimated_size () const override
 get_estimated_size. Rough image size of the CoverFetchInterface More...
 
QString get_keyword () const override
 get name of CoverFetcherInterface like e.g. Discogs More...
 

Member Function Documentation

◆ calc_addresses_from_website()

QStringList LFMCoverFetcher::calc_addresses_from_website ( 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 CoverFetcherInterface.

◆ can_fetch_cover_directly()

bool LFMCoverFetcher::can_fetch_cover_directly ( ) const
overridevirtual

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

Returns

Implements CoverFetcherInterface.

◆ get_album_address()

QString LFMCoverFetcher::get_album_address ( 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

Implements CoverFetcherInterface.

◆ get_artist_address()

QString LFMCoverFetcher::get_artist_address ( const QString &  artist) const
overridevirtual

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

Parameters
artistartist name
Returns

Implements CoverFetcherInterface.

◆ get_estimated_size()

int LFMCoverFetcher::get_estimated_size ( ) const
overridevirtual

get_estimated_size. Rough image size of the CoverFetchInterface

Returns
e.g. 300px

Implements CoverFetcherInterface.

◆ get_keyword()

QString LFMCoverFetcher::get_keyword ( ) const
overridevirtual

get name of CoverFetcherInterface like e.g. Discogs

Returns

Implements CoverFetcherInterface.

◆ get_search_address()

QString LFMCoverFetcher::get_search_address ( const QString &  str) const
overridevirtual

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

Parameters
strsearch string
Returns

Implements CoverFetcherInterface.

◆ is_album_supported()

bool LFMCoverFetcher::is_album_supported ( ) const
overridevirtual

is album search supported

Returns
true if album search is supported

Implements CoverFetcherInterface.

◆ is_artist_supported()

bool LFMCoverFetcher::is_artist_supported ( ) const
overridevirtual

is artist search supported

Returns
true if artist search is supported

Implements CoverFetcherInterface.

◆ is_search_supported()

bool LFMCoverFetcher::is_search_supported ( ) const
overridevirtual

Is text search supported.

Returns
true, if free text search is supported

Implements CoverFetcherInterface.

Inheritance diagram for LFMCoverFetcher:
CoverFetcherInterface