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);
147 bool isFreetextSearchEnabled()
const;
161 QString
hash()
const;
219 QString alternativePath()
const;
255 static Location coverLocationRadio(
const QString& radioStation);
289 static QString invalidPath();
308 #endif // COVERLOCATION_H QString hash() const
Every combination of album and artist will result in a specific hash. You can find those hashes in th...
QString localPath() const
Get the path which is nearest to the audio files. Repair/Create a link in the Sayonara cover director...
static Location invalidLocation()
returns an invalid location
Location()
Default constructor. Creates an invalid Location with the Sayonara logo as cover.
bool hasSearchUrls() const
Check for existing search urls.
void setSearchTerm(const QString &searchTerm)
Set a new search term.
QString localPathDir() const
Calculates the directory where the cover is located.
void setSearchUrls(const QList< Fetcher::Url > &urls)
Set urls where to look for Covers in the internet.
The CoverLocation class.
Definition: CoverLocation.h:38
QString symlinkPath() const
Returns the standard cover path in the .Sayonara directory.
QStringList localPathHints() const
Get the paths audio file where a cover is stored in the same directory.
QString identifer() const
This identifier may be used in order to check how the cover algorithm determined the locations.
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 ...
QString audioFileTarget() const
When retrieving the audio_file_source, and you want to save it afterwards, store it at the place retu...
QString preferredPath() const
Use this to retrieve a filepath where a copy of the cover is stored.
The Album class.
Definition: Album.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...
The Artist class.
Definition: Artist.h:36
QList< Fetcher::Url > searchUrls() const
Retrieve the urls where a new cover can be searched.
QString searchTerm() const
Search term for a free search. As a human you would type that search term into your browser.
QString toString() const
to_string
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...
static QString getCoverDirectory(const QString &appendPath)
returns the standard cover directory
Definition: org_mpris_media_player2_adaptor.h:21
Definition: EngineUtils.h:33