Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
|
Class to store and read song information from CMusicDatabase. More...
#include <Song.h>
Public Member Functions | |
CSong () | |
CSong (CFileItem &item) | |
void | Clear () |
void | MergeScrapedSong (const CSong &source, bool override) |
void | Serialize (CVariant &value) const override |
bool | operator< (const CSong &song) const |
const std::vector< std::string > | GetArtist () const |
Get artist names from the vector of artistcredits objects. | |
const std::string | GetArtistSort () const |
Get artist sort name string. | |
const std::vector< std::string > | GetMusicBrainzArtistID () const |
Get artist MusicBrainz IDs from the vector of artistcredits objects. | |
const std::string | GetArtistString () const |
Get artist names from the artist description string (if it exists) or concatenated from the vector of artistcredits objects. | |
const std::vector< int > | GetArtistIDArray () const |
Get song artist IDs (for json rpc) from the vector of artistcredits objects. | |
const std::vector< std::string > & | GetAlbumArtist () const |
Get album artist names associated with song from tag data Note for initial album processing only, normalised album artist data belongs to album and is stored in album artist credits. | |
const std::string & | GetAlbumArtistSort () const |
Get album artist sort name string. | |
const std::string & | GetDiscSubtitle () const |
Get disc subtitle string where one exists. | |
const std::string & | GetComposerSort () const |
Get composer sort name string. | |
const VECMUSICROLES & | GetContributors () const |
Get the full list of artist names and the role each played for those that contributed to the recording. Given in music file tags other than ARTIST or ALBUMARTIST, e.g. COMPOSER or CONDUCTOR etc. | |
void | AppendArtistRole (const CMusicRole &musicRole) |
void | SetAlbumArtist (const std::vector< std::string > &albumartists) |
Set album artist vector. Album artist is held local to song until album created for initial processing only. Normalised album artist data belongs to album and is stored in album artist credits. | |
bool | HasArtistCredits () const |
Whether this song has any artists in artist credits vector Tests if artist credits has been populated yet, during processing there can be artists in the artist description but not yet in the credits. | |
bool | HasContributors () const |
Whether this song has any artists in music roles (contributors) vector Tests if contributors has been populated yet, there may be none. | |
bool | HasArt () const |
whether this song has art associated with it Tests both the strThumb and embeddedArt members. | |
bool | ArtMatches (const CSong &right) const |
whether the art from this song matches the art from another Tests both the strThumb and embeddedArt members. | |
void | SetArtistCredits (const std::vector< std::string > &names, const std::vector< std::string > &hints, const std::vector< std::string > &mbids) |
Set artist credits using the arrays of tag values. If strArtistSort (as from ARTISTSORT tag) is already set then individual artist sort names are also processed. | |
Public Member Functions inherited from ISerializable |
Public Attributes | |
int | idSong |
int | idAlbum |
std::string | strFileName |
std::string | strTitle |
std::string | strArtistSort |
std::string | strArtistDesc |
VECARTISTCREDITS | artistCredits |
std::string | strAlbum |
std::vector< std::string > | genre |
std::string | strThumb |
EmbeddedArtInfo | embeddedArt |
std::string | strMusicBrainzTrackID |
std::string | strComment |
std::string | strMood |
std::string | strCueSheet |
float | rating |
int | userrating |
int | votes |
int | iTrack |
int | iDuration |
std::string | strOrigReleaseDate |
std::string | strReleaseDate |
std::string | strDiscSubtitle |
int | iTimesPlayed |
CDateTime | lastPlayed |
CDateTime | dateAdded |
CDateTime | dateUpdated |
CDateTime | dateNew |
int | iStartOffset |
int | iEndOffset |
bool | bCompilation |
int | iBPM |
int | iSampleRate |
int | iBitRate |
int | iChannels |
std::string | strRecordLabel |
std::string | strAlbumType |
std::string | songVideoURL |
ReplayGain | replayGain |
Additional Inherited Members | |
Protected Member Functions inherited from ISerializable | |
~ISerializable ()=default | |
Class to store and read song information from CMusicDatabase.
CSong::CSong | ( | ) |
|
explicit |
void CSong::AppendArtistRole | ( | const CMusicRole & | musicRole | ) |
whether the art from this song matches the art from another Tests both the strThumb and embeddedArt members.
void CSong::Clear | ( | ) |
|
inline |
Get album artist names associated with song from tag data Note for initial album processing only, normalised album artist data belongs to album and is stored in album artist credits.
|
inline |
Get album artist sort name string.
const std::vector< std::string > CSong::GetArtist | ( | ) | const |
Get artist names from the vector of artistcredits objects.
const std::vector< int > CSong::GetArtistIDArray | ( | ) | const |
Get song artist IDs (for json rpc) from the vector of artistcredits objects.
const std::string CSong::GetArtistSort | ( | ) | const |
Get artist sort name string.
const std::string CSong::GetArtistString | ( | ) | const |
Get artist names from the artist description string (if it exists) or concatenated from the vector of artistcredits objects.
|
inline |
Get composer sort name string.
|
inline |
Get the full list of artist names and the role each played for those that contributed to the recording. Given in music file tags other than ARTIST or ALBUMARTIST, e.g. COMPOSER or CONDUCTOR etc.
|
inline |
Get disc subtitle string where one exists.
const std::vector< std::string > CSong::GetMusicBrainzArtistID | ( | ) | const |
Get artist MusicBrainz IDs from the vector of artistcredits objects.
bool CSong::HasArt | ( | ) | const |
whether this song has art associated with it Tests both the strThumb and embeddedArt members.
|
inline |
Whether this song has any artists in artist credits vector Tests if artist credits has been populated yet, during processing there can be artists in the artist description but not yet in the credits.
|
inline |
Whether this song has any artists in music roles (contributors) vector Tests if contributors has been populated yet, there may be none.
Implements ISerializable.
|
inline |
Set album artist vector. Album artist is held local to song until album created for initial processing only. Normalised album artist data belongs to album and is stored in album artist credits.
album | artist names as a vector of strings |
void CSong::SetArtistCredits | ( | const std::vector< std::string > & | names, |
const std::vector< std::string > & | hints, | ||
const std::vector< std::string > & | mbids ) |
Set artist credits using the arrays of tag values. If strArtistSort (as from ARTISTSORT tag) is already set then individual artist sort names are also processed.
names | String vector of artist names (as from ARTIST tag) |
hints | String vector of artist name hints (as from ARTISTS tag) |
mbids | String vector of artist Musicbrainz IDs (as from MUSICBRAINZARTISTID tag) |
VECARTISTCREDITS CSong::artistCredits |
bool CSong::bCompilation |
CDateTime CSong::dateAdded |
CDateTime CSong::dateNew |
CDateTime CSong::dateUpdated |
EmbeddedArtInfo CSong::embeddedArt |
std::vector<std::string> CSong::genre |
int CSong::iBitRate |
int CSong::iBPM |
int CSong::iChannels |
int CSong::idAlbum |
int CSong::idSong |
int CSong::iDuration |
int CSong::iEndOffset |
int CSong::iSampleRate |
int CSong::iStartOffset |
int CSong::iTimesPlayed |
int CSong::iTrack |
CDateTime CSong::lastPlayed |
float CSong::rating |
ReplayGain CSong::replayGain |
std::string CSong::songVideoURL |
std::string CSong::strAlbum |
std::string CSong::strAlbumType |
std::string CSong::strArtistDesc |
std::string CSong::strArtistSort |
std::string CSong::strComment |
std::string CSong::strCueSheet |
std::string CSong::strDiscSubtitle |
std::string CSong::strFileName |
std::string CSong::strMood |
std::string CSong::strMusicBrainzTrackID |
std::string CSong::strOrigReleaseDate |
std::string CSong::strRecordLabel |
std::string CSong::strReleaseDate |
std::string CSong::strThumb |
std::string CSong::strTitle |
int CSong::userrating |
int CSong::votes |