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

#include <CoverLookup.h>

Detailed Description

The CoverLookup class.

Signals

void sig_cover_found (const QString &file_path)
 
void sig_finished (bool success)
 

Public Member Functions

 CoverLookup (QObject *parent=nullptr, int n_covers=1)
 
bool fetch_cover (const CoverLocation &cl)
 fetches cover for a CoverLocation. More...
 
bool fetch_album_cover_standard (const QString &artist, const QString &album_name)
 uses CoverLocation(const QString& artist, const QString& album_name) More...
 
bool fetch_album_cover_sampler (const QStringList &artists, const QString &album_name)
 uses CoverLocation(const QString& album_name, const QStringList& artists) More...
 
bool fetch_album_cover (const Album &album)
 uses CoverLocation(const Album& album) More...
 
bool fetch_album_cover_by_id (int album_id, quint8 db_id)
 uses CoverLocation(int album_id, int db_id); More...
 
bool fetch_artist_cover_standard (const QString &artist)
 uses CoverLocation(const QString& artist); More...
 
bool fetch_artist_cover (const Artist &artist)
 uses CoverLocation(const Artist& artist) More...
 
bool fetch_cover_by_searchstring (const QString &searchstring, const QString &target_name)
 Sets CoverLocation::cover_path and CoverLocation::search_url and starts new CoverFetchThread. More...
 
void emit_standard_cover ()
 Emits the Sayonara logo.
 
void stop () override
 not implemented
 

Member Function Documentation

bool CoverLookup::fetch_album_cover ( const Album album)

uses CoverLocation(const Album& album)

Parameters
albumAlbum object
Returns
true
bool CoverLookup::fetch_album_cover_by_id ( int  album_id,
quint8  db_id 
)

uses CoverLocation(int album_id, int db_id);

Parameters
album_idAlbum ID
db_idDatabase ID
Returns
true
bool CoverLookup::fetch_album_cover_sampler ( const QStringList &  artists,
const QString &  album_name 
)

uses CoverLocation(const QString& album_name, const QStringList& artists)

Parameters
artistsList of artist names
album_nameAlbum name
Returns
true
bool CoverLookup::fetch_album_cover_standard ( const QString &  artist,
const QString &  album_name 
)

uses CoverLocation(const QString& artist, const QString& album_name)

Parameters
artistArtist name
album_nameAlbum name
Returns
true
bool CoverLookup::fetch_artist_cover ( const Artist artist)

uses CoverLocation(const Artist& artist)

Parameters
artistArtist object
Returns
true
bool CoverLookup::fetch_artist_cover_standard ( const QString &  artist)

uses CoverLocation(const QString& artist);

Parameters
artistArtist name
Returns
true
bool CoverLookup::fetch_cover ( const CoverLocation cl)

fetches cover for a CoverLocation.

  1. Looks up CoverLocation::cover_path
  2. Looks up CoverLocation::local_paths
  3. Starts a CoverFetchThread
    Parameters
    clCoverLocation of interest
    Returns
    always true
bool CoverLookup::fetch_cover_by_searchstring ( const QString &  searchstring,
const QString &  target_name 
)

Sets CoverLocation::cover_path and CoverLocation::search_url and starts new CoverFetchThread.

Parameters
searchstringa Google search string
target_nametarget cover path
Returns
true
Inheritance diagram for CoverLookup:
CoverLookupInterface