Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
CAlbum Class Reference

#include <Album.h>

Public Types

enum  ReleaseType { Album = 0 , Single }
 
typedef enum CAlbum::ReleaseType ReleaseType
 

Public Member Functions

 CAlbum (const CFileItem &item)
 
 CAlbum ()=default
 
bool operator< (const CAlbum &a) const
 
void MergeScrapedAlbum (const CAlbum &album, bool override=true)
 
void Reset ()
 
const std::vector< std::string > GetAlbumArtist () const
 Get album artist names from the vector of artistcredits objects.
 
const std::vector< std::string > GetMusicBrainzAlbumArtistID () const
 Get album artist MusicBrainz IDs from the vector of artistcredits objects.
 
std::string GetGenreString () const
 
const std::string GetAlbumArtistString () const
 Get album artist names from the artist description string (if it exists) or concatenated from the vector of artistcredits objects.
 
const std::string GetAlbumArtistSort () const
 Get album artist sort name from the artist sort string (if it exists) or concatenated from the vector of artistcredits objects.
 
const std::vector< intGetArtistIDArray () const
 Get album artist IDs (for json rpc) from the vector of artistcredits objects.
 
std::string GetReleaseType () const
 
void SetReleaseType (const std::string &strReleaseType)
 
void SetDateAdded (const std::string &strDateAdded)
 
void SetDateUpdated (const std::string &strDateUpdated)
 
void SetDateNew (const std::string &strDateNew)
 
void SetLastPlayed (const std::string &strLastPlayed)
 
void SetArtistCredits (const std::vector< std::string > &names, const std::vector< std::string > &hints, const std::vector< std::string > &mbids, const std::vector< std::string > &artistnames=std::vector< std::string >(), const std::vector< std::string > &artisthints=std::vector< std::string >(), const std::vector< std::string > &artistmbids=std::vector< std::string >())
 Set album artist credits using the arrays of tag values. If strArtistSort (as from ALBUMARTISTSORT tag) is already set then individual artist sort names are also processed.
 
bool Load (const TiXmlElement *element, bool append=false, bool prioritise=false)
 Load album information from an XML file. See CVideoInfoTag::Load for a description of the types of elements we load.
 
bool Save (TiXmlNode *node, const std::string &tag, const std::string &strPath)
 

Static Public Member Functions

static std::string ReleaseTypeToString (ReleaseType releaseType)
 
static ReleaseType ReleaseTypeFromString (const std::string &strReleaseType)
 

Public Attributes

int idAlbum = -1
 
std::string strAlbum
 
std::string strMusicBrainzAlbumID
 
std::string strReleaseGroupMBID
 
std::string strArtistDesc
 
std::string strArtistSort
 
VECARTISTCREDITS artistCredits
 
std::vector< std::string > genre
 
CScraperUrl thumbURL
 
std::vector< std::string > moods
 
std::vector< std::string > styles
 
std::vector< std::string > themes
 
std::map< std::string, std::string > art
 
std::string strReview
 
std::string strLabel
 
std::string strType
 
std::string strReleaseStatus
 
std::string strPath
 
float fRating = -1
 
int iUserrating = -1
 
int iVotes = -1
 
std::string strReleaseDate
 
std::string strOrigReleaseDate
 
bool bBoxedSet = false
 
bool bCompilation = false
 
int iTimesPlayed = 0
 
CDateTime dateAdded
 
CDateTime dateUpdated
 
CDateTime dateNew
 
CDateTime lastPlayed
 
int iTotalDiscs = -1
 
VECSONGS songs
 Local songs.
 
ReleaseType releaseType = Album
 
std::string strLastScraped
 
bool bScrapedMBID = false
 
bool bArtistSongMerge = false
 
int iAlbumDuration = 0
 

Member Typedef Documentation

◆ ReleaseType

Member Enumeration Documentation

◆ ReleaseType

Enumerator
Album 
Single 

Constructor & Destructor Documentation

◆ CAlbum() [1/2]

CAlbum::CAlbum ( const CFileItem & item)
explicit

◆ CAlbum() [2/2]

CAlbum::CAlbum ( )
default

Member Function Documentation

◆ GetAlbumArtist()

const std::vector< std::string > CAlbum::GetAlbumArtist ( ) const

Get album artist names from the vector of artistcredits objects.

Returns
album artist names as a vector of strings

◆ GetAlbumArtistSort()

const std::string CAlbum::GetAlbumArtistSort ( ) const

Get album artist sort name from the artist sort string (if it exists) or concatenated from the vector of artistcredits objects.

Returns
album artist sort names as a single string

◆ GetAlbumArtistString()

const std::string CAlbum::GetAlbumArtistString ( ) const

Get album artist names from the artist description string (if it exists) or concatenated from the vector of artistcredits objects.

Returns
album artist names as a single string

◆ GetArtistIDArray()

const std::vector< int > CAlbum::GetArtistIDArray ( ) const

Get album artist IDs (for json rpc) from the vector of artistcredits objects.

Returns
album artist IDs as a vector of integers

◆ GetGenreString()

std::string CAlbum::GetGenreString ( ) const

◆ GetMusicBrainzAlbumArtistID()

const std::vector< std::string > CAlbum::GetMusicBrainzAlbumArtistID ( ) const

Get album artist MusicBrainz IDs from the vector of artistcredits objects.

Returns
album artist MusicBrainz IDs as a vector of strings

◆ GetReleaseType()

std::string CAlbum::GetReleaseType ( ) const

◆ Load()

bool CAlbum::Load ( const TiXmlElement * element,
bool append = false,
bool prioritise = false )

Load album information from an XML file. See CVideoInfoTag::Load for a description of the types of elements we load.

Parameters
elementthe root XML element to parse.
appendwhether information should be added to the existing tag, or whether it should be reset first.
prioritiseif appending, whether additive tags should be prioritised (i.e. replace or prepend) over existing values. Defaults to false.
See also
CVideoInfoTag::Load

◆ MergeScrapedAlbum()

void CAlbum::MergeScrapedAlbum ( const CAlbum & album,
bool override = true )

◆ operator<()

bool CAlbum::operator< ( const CAlbum & a) const

◆ ReleaseTypeFromString()

CAlbum::ReleaseType CAlbum::ReleaseTypeFromString ( const std::string & strReleaseType)
static

◆ ReleaseTypeToString()

std::string CAlbum::ReleaseTypeToString ( CAlbum::ReleaseType releaseType)
static

◆ Reset()

void CAlbum::Reset ( )
inline

◆ Save()

bool CAlbum::Save ( TiXmlNode * node,
const std::string & tag,
const std::string & strPath )

◆ SetArtistCredits()

void CAlbum::SetArtistCredits ( const std::vector< std::string > & names,
const std::vector< std::string > & hints,
const std::vector< std::string > & mbids,
const std::vector< std::string > & artistnames = std::vector<std::string>(),
const std::vector< std::string > & artisthints = std::vector<std::string>(),
const std::vector< std::string > & artistmbids = std::vector<std::string>() )

Set album artist credits using the arrays of tag values. If strArtistSort (as from ALBUMARTISTSORT tag) is already set then individual artist sort names are also processed.

Parameters
namesString vector of albumartist names (as from ALBUMARTIST tag)
hintsString vector of albumartist name hints (as from ALBUMARTISTS tag)
mbidsString vector of albumartist Musicbrainz IDs (as from MUSICBRAINZABUMARTISTID tag)
artistnamesString vector of artist names (as from ARTIST tag)
artisthintsString vector of artist name hints (as from ARTISTS tag)
artistmbidsString vector of artist Musicbrainz IDs (as from MUSICBRAINZARTISTID tag)

◆ SetDateAdded()

void CAlbum::SetDateAdded ( const std::string & strDateAdded)

◆ SetDateNew()

void CAlbum::SetDateNew ( const std::string & strDateNew)

◆ SetDateUpdated()

void CAlbum::SetDateUpdated ( const std::string & strDateUpdated)

◆ SetLastPlayed()

void CAlbum::SetLastPlayed ( const std::string & strLastPlayed)

◆ SetReleaseType()

void CAlbum::SetReleaseType ( const std::string & strReleaseType)

Member Data Documentation

◆ art

std::map<std::string, std::string> CAlbum::art

◆ artistCredits

VECARTISTCREDITS CAlbum::artistCredits

◆ bArtistSongMerge

bool CAlbum::bArtistSongMerge = false

◆ bBoxedSet

bool CAlbum::bBoxedSet = false

◆ bCompilation

bool CAlbum::bCompilation = false

◆ bScrapedMBID

bool CAlbum::bScrapedMBID = false

◆ dateAdded

CDateTime CAlbum::dateAdded

◆ dateNew

CDateTime CAlbum::dateNew

◆ dateUpdated

CDateTime CAlbum::dateUpdated

◆ fRating

float CAlbum::fRating = -1

◆ genre

std::vector<std::string> CAlbum::genre

◆ iAlbumDuration

int CAlbum::iAlbumDuration = 0

◆ idAlbum

int CAlbum::idAlbum = -1

◆ iTimesPlayed

int CAlbum::iTimesPlayed = 0

◆ iTotalDiscs

int CAlbum::iTotalDiscs = -1

◆ iUserrating

int CAlbum::iUserrating = -1

◆ iVotes

int CAlbum::iVotes = -1

◆ lastPlayed

CDateTime CAlbum::lastPlayed

◆ moods

std::vector<std::string> CAlbum::moods

◆ releaseType

ReleaseType CAlbum::releaseType = Album

◆ songs

VECSONGS CAlbum::songs

Local songs.

◆ strAlbum

std::string CAlbum::strAlbum

◆ strArtistDesc

std::string CAlbum::strArtistDesc

◆ strArtistSort

std::string CAlbum::strArtistSort

◆ strLabel

std::string CAlbum::strLabel

◆ strLastScraped

std::string CAlbum::strLastScraped

◆ strMusicBrainzAlbumID

std::string CAlbum::strMusicBrainzAlbumID

◆ strOrigReleaseDate

std::string CAlbum::strOrigReleaseDate

◆ strPath

std::string CAlbum::strPath

◆ strReleaseDate

std::string CAlbum::strReleaseDate

◆ strReleaseGroupMBID

std::string CAlbum::strReleaseGroupMBID

◆ strReleaseStatus

std::string CAlbum::strReleaseStatus

◆ strReview

std::string CAlbum::strReview

◆ strType

std::string CAlbum::strType

◆ styles

std::vector<std::string> CAlbum::styles

◆ themes

std::vector<std::string> CAlbum::themes

◆ thumbURL

CScraperUrl CAlbum::thumbURL

The documentation for this class was generated from the following files: