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

Retrieve Download Urls for Cover Searcher. CoverFetcherInterface can be registered, so for example a last.fm cover fetcher via the register_cover_fetcher method. A specific CoverFetcherInterface may be retrieved by using the get_coverfetcher method. More...

#include <CoverFetchManager.h>

Inheritance diagram for Cover::Fetcher::Manager:

Public Member Functions

void registerCoverFetcher (CoverFetcherPtr fetcher)
 Register a cover fetcher. Per default there is one for Discogs, last.fm and Google. More...
 
QList< UrlartistAddresses (const QString &artist) const
 get urls for a artist search query More...
 
QList< UrlalbumAddresses (const QString &artist, const QString &album) const
 get urls for a album search query More...
 
QList< UrlsearchAddresses (const QString &str) const
 get urls for a fuzzy query More...
 
QList< UrlradioSearchAddresses (const QString &stationName, const QString &radioUrl) const
 
QList< UrlsearchAddresses (const QString &str, const QString &coverFetcherIdentifier) const
 get urls for a fuzzy query More...
 
CoverFetcherPtr coverfetcher (const Url &url) const
 get a CoverFetcherInterface by a specific url More...
 
CoverFetcherList coverfetchers () const
 fetches all available cover fetcher More...
 
bool isActive (const CoverFetcherPtr fetcher) const
 
bool isActive (const QString &identifier) const
 
Url directFetcherUrl (const QString &url) const
 If the LibraryItem has a reference to a cover download url an appropriate Url object can be retrieved here. The corresponding Cover::Fetcher is Cover::Fetcher::DirectFetcher. More...
 
Url websiteFetcherUrl (const QString &url) const
 

Static Public Member Functions

static bool isSearchstringWebsite (const QString &searchstring)
 

Detailed Description

Retrieve Download Urls for Cover Searcher. CoverFetcherInterface can be registered, so for example a last.fm cover fetcher via the register_cover_fetcher method. A specific CoverFetcherInterface may be retrieved by using the get_coverfetcher method.

Member Function Documentation

◆ albumAddresses()

QList< Url > Cover::Fetcher::Manager::albumAddresses ( const QString &  artist,
const QString &  album 
) const

get urls for a album search query

Parameters
artistartist name
albumalbum name
Returns
list of urls

◆ artistAddresses()

QList< Url > Cover::Fetcher::Manager::artistAddresses ( const QString &  artist) const

get urls for a artist search query

Parameters
artistname
Returns
list of urls

◆ coverfetcher()

CoverFetcherPtr Cover::Fetcher::Manager::coverfetcher ( const Url url) const

get a CoverFetcherInterface by a specific url

Parameters
urlthe url retrieved from artist_addresses(), album_addresses(), search_addresses() or direct_fetch_url()
Returns
null, if there's no suitable CoverFetcherInterface registered

◆ coverfetchers()

CoverFetcherList Cover::Fetcher::Manager::coverfetchers ( ) const

fetches all available cover fetcher

Returns

◆ directFetcherUrl()

Url Cover::Fetcher::Manager::directFetcherUrl ( const QString &  url) const

If the LibraryItem has a reference to a cover download url an appropriate Url object can be retrieved here. The corresponding Cover::Fetcher is Cover::Fetcher::DirectFetcher.

Parameters
urlthe direct download url
Returns

◆ registerCoverFetcher()

void Cover::Fetcher::Manager::registerCoverFetcher ( CoverFetcherPtr  fetcher)

Register a cover fetcher. Per default there is one for Discogs, last.fm and Google.

Parameters
fetcheran instance of a CoverFetcherInterface

◆ searchAddresses() [1/2]

QList< Url > Cover::Fetcher::Manager::searchAddresses ( const QString &  str) const

get urls for a fuzzy query

Parameters
strquery string
Returns
list of urls

◆ searchAddresses() [2/2]

QList< Url > Cover::Fetcher::Manager::searchAddresses ( const QString &  str,
const QString &  coverFetcherIdentifier 
) const

get urls for a fuzzy query

Parameters
strquery string
Returns
list of urls