 |
Sayonara Player
|
21 #ifndef COVERLOCATION_H
22 #define COVERLOCATION_H
25 #include "Utils/Pimpl.h"
26 #include "Components/Covers/Fetcher/CoverFetcherUrl.h"
43 void setValid(
bool b);
44 void setIdentifier(
const QString& identifier);
45 void setLocalPathHints(
const QStringList& localPaths);
51 void setHash(
const QString& str);
60 bool setAudioFileSource(
const QString& audio_filesource,
const QString& symlinkPath);
130 const QString& coverFetcherIdentifier);
218 QString alternativePath()
const;
254 static Location coverLocationRadio(
const QString& radioStation);
288 static QString invalidPath();
300 #endif // COVERLOCATION_H
QString toString() const
to_string
static Location coverLocation(const Artist &artist)
overloaded. extracts artist name and calls coverLocation(const QString& artist)
QString searchTerm() const
Search term for a free search. As a human you would type that search term into your browser.
QString hashPath() const
Returns the standard cover path in the .Sayonara directory.
void setSearchUrls(const QList< Fetcher::Url > &urls)
Set urls where to look for Covers in the internet.
QList< Fetcher::Url > searchUrls() const
Retrieve the urls where a new cover can be searched.
static Location xcoverLocation(const Album &album)
overloaded. Calls coverLocation(const QString& albumName, const QStringList& artists)
void enableFreetextSearch(bool b)
When enabling freetext search you specify the search string yourself and it is not generated automati...
QString hash() const
Every combination of album and artist will result in a specific hash. You can find those hashes in th...
QStringList localPathHints() const
Get the paths audio file where a cover is stored in the same directory.
The Album class.
Definition: Album.h:41
QString identifer() const
This identifier may be used in order to check how the cover algorithm determined the locations.
Definition: EngineUtils.h:33
Definition: org_mpris_media_player2_adaptor.h:21
static Location coverLocation(const QString &albumName, const QStringList &artists)
overloaded. Picks major artist out of artists and calls coverLocation(const QString& albumName,...
static Location invalidLocation()
returns an invalid location
bool hasSearchUrls() const
Check for existing search urls.
Location()
Default constructor. Creates an invalid Location with the Sayonara logo as cover.
void setSearchTerm(const QString &searchTerm)
Set a new search term.
QString localPathDir() const
Calculates the directory where the cover is located.
The Artist class.
Definition: Artist.h:38
static Location coverLocation(const QList< QUrl > &urls, const QString &token)
fetch a cover from a specific url
The CoverLocation class.
Definition: CoverLocation.h:39
QString audioFileSource() const
Returns the path to the music file where a cover is stored. You can extract the cover by using Taggin...
static Location coverLocation(const QString &albumName, const QString &artistName)
creates CoverLocation by taking the md5 sum between albumName and artistName
bool isValid() const
returns if the current location is a valid or a standard constructed location
bool hasAudioFileSource() const
Indicates if it is possible to fetch the cover directly from the audio file. If you call this method ...
void setSearchTerm(const QString &searchTerm, const QString &coverFetcherIdentifier)
Set a new search term for a specific cover fetcher Cover fetcher strings can be found in the Cover::F...
QString audioFileTarget() const
When retrieving the audio_file_source, and you want to save it afterwards, store it at the place retu...
QString localPath() const
Get the path which is nearest to the audio files. Repair/Create a link in the Sayonara cover director...
QString preferredPath() const
Use this to retrieve a filepath where a copy of the cover is stored.
static Location coverLocation(const QString &artist)
Creates cover token of the form artist_<md5sum of artist>
static Location coverLocation(const MetaData &md)
overloaded. if MetaData::albumId < 0 calls coverLocation(const QString& albumName,...