Sayonara Player
Public Member Functions | List of all members
Cover::Fetcher::Website Class Reference

Parses a website for all images. This cover fetcher behaves different from the others because every Cover::Fetcher::Base has a special website attached to it. This one does not have a special website. The search address will return the input itself because when searching for "https://kexp.org" this is exactly the search address. More...

#include <Website.h>

Inheritance diagram for Cover::Fetcher::Website:
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...
 
int estimatedSize () const override
 get_estimated_size. Rough image size of the CoverFetchInterface More...
 
QString fulltextSearchAddress (const QString &address) const override
 will always return the website which has been set by set_website(const QString&) More...
 
virtual void setWebsite (const QString &website)
 
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...
 

Detailed Description

Parses a website for all images. This cover fetcher behaves different from the others because every Cover::Fetcher::Base has a special website attached to it. This one does not have a special website. The search address will return the input itself because when searching for "https://kexp.org" this is exactly the search address.

Member Function Documentation

◆ albumAddress()

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

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

Parameters
artistartist name
albumalbum name
Returns

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

◆ artistAddress()

virtual QString Cover::Fetcher::Base::artistAddress ( const QString &  artist) const
virtualinherited

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

Parameters
artistartist name
Returns

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

◆ canFetchCoverDirectly()

bool Cover::Fetcher::Website::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::Website::estimatedSize ( ) const
overridevirtual

get_estimated_size. Rough image size of the CoverFetchInterface

Returns
e.g. 300px

Implements Cover::Fetcher::Base.

◆ fulltextSearchAddress()

QString Cover::Fetcher::Website::fulltextSearchAddress ( const QString &  address) const
overridevirtual

will always return the website which has been set by set_website(const QString&)

Parameters
addressignored
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::Website::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.