Kodi Documentation
Kodi is an open source media player and entertainment hub.
InfoTagMusic

Kodi's music info tag class. More...

Collaboration diagram for InfoTagMusic:

Classes

class  XBMCAddon::xbmc::InfoTagMusic
 

Functions

 XBMCAddon::xbmc::InfoTagMusic::InfoTagMusic (...)
 { xbmc.InfoTagMusic([offscreen]) } Create a music info tag. More...
 
 XBMCAddon::xbmc::InfoTagMusic::getDbId ()
 { getDbId() } Get identification number of tag in database. More...
 
 XBMCAddon::xbmc::InfoTagMusic::getURL ()
 { getURL() } Returns url of source as string from music info tag. More...
 
 XBMCAddon::xbmc::InfoTagMusic::getTitle ()
 { getTitle() } Returns the title from music as string on info tag. More...
 
 XBMCAddon::xbmc::InfoTagMusic::getMediaType ()
 { getMediaType() } Get the media type of the music item. More...
 
 XBMCAddon::xbmc::InfoTagMusic::getArtist ()
 { getArtist() } Returns the artist from music as string if present. More...
 
 XBMCAddon::xbmc::InfoTagMusic::getAlbum ()
 { getAlbum() } Returns the album from music tag as string if present. More...
 
 XBMCAddon::xbmc::InfoTagMusic::getAlbumArtist ()
 { getAlbumArtist() } Returns the album artist from music tag as string if present. More...
 
 XBMCAddon::xbmc::InfoTagMusic::getGenre ()
 { getGenre() } Returns the genre name from music tag as string if present. More...
 
 XBMCAddon::xbmc::InfoTagMusic::getGenres ()
 { getGenres() } Returns the list of genres from music tag if present. More...
 
 XBMCAddon::xbmc::InfoTagMusic::getDuration ()
 { getDuration() } Returns the duration of music as integer from info tag. More...
 
 XBMCAddon::xbmc::InfoTagMusic::getYear ()
 { getYear() } Returns the year of music as integer from info tag. More...
 
 XBMCAddon::xbmc::InfoTagMusic::getRating ()
 { getRating() } Returns the scraped rating as integer. More...
 
 XBMCAddon::xbmc::InfoTagMusic::getUserRating ()
 { getUserRating() } Returns the user rating as integer (-1 if not existing) More...
 
 XBMCAddon::xbmc::InfoTagMusic::getTrack ()
 { getTrack() } Returns the track number (if present) from music info tag as integer. More...
 
 XBMCAddon::xbmc::InfoTagMusic::getDisc ()
 { getDisc() } Returns the disk number (if present) from music info tag as integer. More...
 
 XBMCAddon::xbmc::InfoTagMusic::getReleaseDate ()
 { getReleaseDate() } Returns the release date as string from music info tag (if present). More...
 
 XBMCAddon::xbmc::InfoTagMusic::getListeners ()
 { getListeners() } Returns the listeners as integer from music info tag. More...
 
 XBMCAddon::xbmc::InfoTagMusic::getPlayCount ()
 { getPlayCount() } Returns the number of carried out playbacks. More...
 
 XBMCAddon::xbmc::InfoTagMusic::getLastPlayed ()
 { getLastPlayed() } Returns last played time as string from music info tag. More...
 
 XBMCAddon::xbmc::InfoTagMusic::getLastPlayedAsW3C ()
 { getLastPlayedAsW3C() } Returns last played time as string in W3C format (YYYY-MM-DDThh:mm:ssTZD). More...
 
 XBMCAddon::xbmc::InfoTagMusic::getComment ()
 { getComment() } Returns comment as string from music info tag. More...
 
 XBMCAddon::xbmc::InfoTagMusic::getLyrics ()
 { getLyrics() } Returns a string from lyrics. More...
 
 XBMCAddon::xbmc::InfoTagMusic::getMusicBrainzTrackID ()
 { getMusicBrainzTrackID() } Returns the MusicBrainz Recording ID from music info tag (if present). More...
 
 XBMCAddon::xbmc::InfoTagMusic::getMusicBrainzArtistID ()
 { getMusicBrainzArtistID() } Returns the MusicBrainz Artist IDs from music info tag (if present). More...
 
 XBMCAddon::xbmc::InfoTagMusic::getMusicBrainzAlbumID ()
 { getMusicBrainzAlbumID() } Returns the MusicBrainz Release ID from music info tag (if present). More...
 
 XBMCAddon::xbmc::InfoTagMusic::getMusicBrainzReleaseGroupID ()
 { getMusicBrainzReleaseGroupID() } Returns the MusicBrainz Release Group ID from music info tag (if present). More...
 
 XBMCAddon::xbmc::InfoTagMusic::getMusicBrainzAlbumArtistID ()
 { getMusicBrainzAlbumArtistID() } Returns the MusicBrainz Release Artist IDs from music info tag (if present). More...
 
 XBMCAddon::xbmc::InfoTagMusic::setDbId (...)
 { setDbId(dbId, type) } Set the database identifier of the music item. More...
 
 XBMCAddon::xbmc::InfoTagMusic::setURL (...)
 { setURL(url) } Set the URL of the music item. More...
 
 XBMCAddon::xbmc::InfoTagMusic::setMediaType (...)
 { setMediaType(mediaType) } Set the media type of the music item. More...
 
 XBMCAddon::xbmc::InfoTagMusic::setTrack (...)
 { setTrack(track) } Set the track number of the song. More...
 
 XBMCAddon::xbmc::InfoTagMusic::setDisc (...)
 { setDisc(disc) } Set the disc number of the song. More...
 
 XBMCAddon::xbmc::InfoTagMusic::setDuration (...)
 { setDuration(duration) } Set the duration of the song. More...
 
 XBMCAddon::xbmc::InfoTagMusic::setYear (...)
 { setYear(year) } Set the year of the music item. More...
 
 XBMCAddon::xbmc::InfoTagMusic::setReleaseDate (...)
 { setReleaseDate(releaseDate) } Set the release date of the music item. More...
 
 XBMCAddon::xbmc::InfoTagMusic::setListeners (...)
 { setListeners(listeners) } Set the number of listeners of the music item. More...
 
 XBMCAddon::xbmc::InfoTagMusic::setPlayCount (...)
 { setPlayCount(playcount) } Set the playcount of the music item. More...
 
 XBMCAddon::xbmc::InfoTagMusic::setGenres (...)
 { setGenres(genres) } Set the genres of the music item. More...
 
 XBMCAddon::xbmc::InfoTagMusic::setAlbum (...)
 { setAlbum(album) } Set the album of the music item. More...
 
 XBMCAddon::xbmc::InfoTagMusic::setArtist (...)
 { setArtist(artist) } Set the artist(s) of the music item. More...
 
 XBMCAddon::xbmc::InfoTagMusic::setAlbumArtist (...)
 { setAlbumArtist(albumArtist) } Set the album artist(s) of the music item. More...
 
 XBMCAddon::xbmc::InfoTagMusic::setTitle (...)
 { setTitle(title) } Set the title of the music item. More...
 
 XBMCAddon::xbmc::InfoTagMusic::setRating (...)
 { setRating(rating) } Set the rating of the music item. More...
 
 XBMCAddon::xbmc::InfoTagMusic::setUserRating (...)
 { setUserRating(userrating) } Set the user rating of the music item. More...
 
 XBMCAddon::xbmc::InfoTagMusic::setLyrics (...)
 { setLyrics(lyrics) } Set the lyrics of the song. More...
 
 XBMCAddon::xbmc::InfoTagMusic::setLastPlayed (...)
 { setLastPlayed(lastPlayed) } Set the last played date of the music item. More...
 
 XBMCAddon::xbmc::InfoTagMusic::setMusicBrainzTrackID (...)
 { setMusicBrainzTrackID(musicBrainzTrackID) } Set the MusicBrainz track ID of the song. More...
 
 XBMCAddon::xbmc::InfoTagMusic::setMusicBrainzArtistID (...)
 { setMusicBrainzArtistID(musicBrainzArtistID) } Set the MusicBrainz artist IDs of the music item. More...
 
 XBMCAddon::xbmc::InfoTagMusic::setMusicBrainzAlbumID (...)
 { setMusicBrainzAlbumID(musicBrainzAlbumID) } Set the MusicBrainz album ID of the music item. More...
 
 XBMCAddon::xbmc::InfoTagMusic::setMusicBrainzReleaseGroupID (...)
 { setMusicBrainzReleaseGroupID(musicBrainzReleaseGroupID) } Set the MusicBrainz release group ID of the music item. More...
 
 XBMCAddon::xbmc::InfoTagMusic::setMusicBrainzAlbumArtistID (...)
 { setMusicBrainzAlbumArtistID(musicBrainzAlbumArtistID) } Set the MusicBrainz album artist IDs of the music item. More...
 
 XBMCAddon::xbmc::InfoTagMusic::setComment (...)
 { setComment(comment) } Set the comment of the music item. More...
 

Detailed Description

Kodi's music info tag class.

{ xbmc.InfoTagMusic([offscreen]) }

Access and / or modify the music metadata of a ListItem.


Example:

...
tag = xbmc.Player().getMusicInfoTag()
title = tag.getTitle()
url = tag.getURL()
...

Function Documentation

◆ getAlbum()

String XBMCAddon::xbmc::InfoTagMusic::getAlbum ( )

{ getAlbum() } Returns the album from music tag as string if present.

Returns
[string] Music album name

◆ getAlbumArtist()

String XBMCAddon::xbmc::InfoTagMusic::getAlbumArtist ( )

{ getAlbumArtist() } Returns the album artist from music tag as string if present.

Returns
[string] Music album artist name

◆ getArtist()

String XBMCAddon::xbmc::InfoTagMusic::getArtist ( )

{ getArtist() } Returns the artist from music as string if present.

Returns
[string] Music artist

◆ getComment()

String XBMCAddon::xbmc::InfoTagMusic::getComment ( )

{ getComment() } Returns comment as string from music info tag.

Returns
[string] Comment on tag

◆ getDbId()

int XBMCAddon::xbmc::InfoTagMusic::getDbId ( )

{ getDbId() } Get identification number of tag in database.

Returns
[integer] database id.

New function added.

◆ getDisc()

int XBMCAddon::xbmc::InfoTagMusic::getDisc ( )

{ getDisc() } Returns the disk number (if present) from music info tag as integer.

Returns
[integer] Disc number

◆ getDuration()

int XBMCAddon::xbmc::InfoTagMusic::getDuration ( )

{ getDuration() } Returns the duration of music as integer from info tag.

Returns
[integer] Duration

◆ getGenre()

String XBMCAddon::xbmc::InfoTagMusic::getGenre ( )

{ getGenre() } Returns the genre name from music tag as string if present.

Returns
[string] Genre name

Deprecated. Use getGenres() instead.

◆ getGenres()

std::vector< String > XBMCAddon::xbmc::InfoTagMusic::getGenres ( )

{ getGenres() } Returns the list of genres from music tag if present.

Returns
[list] List of genres

New function added.

◆ getLastPlayed()

String XBMCAddon::xbmc::InfoTagMusic::getLastPlayed ( )

{ getLastPlayed() } Returns last played time as string from music info tag.

Returns
[string] Last played date / time on tag

Deprecated. Use getLastPlayedAsW3C() instead.

◆ getLastPlayedAsW3C()

String XBMCAddon::xbmc::InfoTagMusic::getLastPlayedAsW3C ( )

{ getLastPlayedAsW3C() } Returns last played time as string in W3C format (YYYY-MM-DDThh:mm:ssTZD).

Returns
[string] Last played datetime (W3C)

New function added.

◆ getListeners()

int XBMCAddon::xbmc::InfoTagMusic::getListeners ( )

{ getListeners() } Returns the listeners as integer from music info tag.

Returns
[integer] Listeners

◆ getLyrics()

String XBMCAddon::xbmc::InfoTagMusic::getLyrics ( )

{ getLyrics() } Returns a string from lyrics.

Returns
[string] Lyrics on tag

◆ getMediaType()

String XBMCAddon::xbmc::InfoTagMusic::getMediaType ( )

{ getMediaType() } Get the media type of the music item.

Returns
[string] media type

Available strings about media type for music:

String Description
artist If it is defined as an artist
album If it is defined as an album
song If it is defined as a song

New function added.

◆ getMusicBrainzAlbumArtistID()

std::vector< String > XBMCAddon::xbmc::InfoTagMusic::getMusicBrainzAlbumArtistID ( )

{ getMusicBrainzAlbumArtistID() } Returns the MusicBrainz Release Artist IDs from music info tag (if present).

Returns
[list] MusicBrainz Release Artist IDs

New function added.

◆ getMusicBrainzAlbumID()

String XBMCAddon::xbmc::InfoTagMusic::getMusicBrainzAlbumID ( )

{ getMusicBrainzAlbumID() } Returns the MusicBrainz Release ID from music info tag (if present).

Returns
[string] MusicBrainz Release ID

New function added.

◆ getMusicBrainzArtistID()

std::vector< String > XBMCAddon::xbmc::InfoTagMusic::getMusicBrainzArtistID ( )

{ getMusicBrainzArtistID() } Returns the MusicBrainz Artist IDs from music info tag (if present).

Returns
[list] MusicBrainz Artist IDs

New function added.

◆ getMusicBrainzReleaseGroupID()

String XBMCAddon::xbmc::InfoTagMusic::getMusicBrainzReleaseGroupID ( )

{ getMusicBrainzReleaseGroupID() } Returns the MusicBrainz Release Group ID from music info tag (if present).

Returns
[string] MusicBrainz Release Group ID

New function added.

◆ getMusicBrainzTrackID()

String XBMCAddon::xbmc::InfoTagMusic::getMusicBrainzTrackID ( )

{ getMusicBrainzTrackID() } Returns the MusicBrainz Recording ID from music info tag (if present).

Returns
[string] MusicBrainz Recording ID

New function added.

◆ getPlayCount()

int XBMCAddon::xbmc::InfoTagMusic::getPlayCount ( )

{ getPlayCount() } Returns the number of carried out playbacks.

Returns
[integer] Playback count

◆ getRating()

int XBMCAddon::xbmc::InfoTagMusic::getRating ( )

{ getRating() } Returns the scraped rating as integer.

Returns
[integer] Rating

◆ getReleaseDate()

String XBMCAddon::xbmc::InfoTagMusic::getReleaseDate ( )

{ getReleaseDate() } Returns the release date as string from music info tag (if present).

Returns
[string] Release date

◆ getTitle()

String XBMCAddon::xbmc::InfoTagMusic::getTitle ( )

{ getTitle() } Returns the title from music as string on info tag.

Returns
[string] Music title

◆ getTrack()

int XBMCAddon::xbmc::InfoTagMusic::getTrack ( )

{ getTrack() } Returns the track number (if present) from music info tag as integer.

Returns
[integer] Track number

◆ getURL()

String XBMCAddon::xbmc::InfoTagMusic::getURL ( )

{ getURL() } Returns url of source as string from music info tag.

Returns
[string] Url of source

◆ getUserRating()

int XBMCAddon::xbmc::InfoTagMusic::getUserRating ( )

{ getUserRating() } Returns the user rating as integer (-1 if not existing)

Returns
[integer] User rating

◆ getYear()

int XBMCAddon::xbmc::InfoTagMusic::getYear ( )

{ getYear() } Returns the year of music as integer from info tag.

Returns
[integer] Year

New function added.

◆ InfoTagMusic()

XBMCAddon::xbmc::InfoTagMusic::InfoTagMusic (   ...)

{ xbmc.InfoTagMusic([offscreen]) } Create a music info tag.

Parameters
offscreen[opt] bool (default False) - if GUI based locks should be avoided. Most of the times listitems are created offscreen and added later to a container for display (e.g. plugins) or they are not even displayed (e.g. python scrapers). In such cases, there is no need to lock the GUI when creating the items (increasing your addon performance). Note however, that if you are creating listitems and managing the container itself (e.g using WindowXML or WindowXMLDialog classes) subsquent modifications to the item will require locking. Thus, in such cases, use the default value (False).

Added offscreen argument.

Example:

...
musicinfo = xbmc.InfoTagMusic(offscreen=False)
...

◆ setAlbum()

void XBMCAddon::xbmc::InfoTagMusic::setAlbum (   ...)

{ setAlbum(album) } Set the album of the music item.

Parameters
albumstring - Album.

New function added.

◆ setAlbumArtist()

void XBMCAddon::xbmc::InfoTagMusic::setAlbumArtist (   ...)

{ setAlbumArtist(albumArtist) } Set the album artist(s) of the music item.

Parameters
albumArtiststring - Album artist(s).

New function added.

◆ setArtist()

void XBMCAddon::xbmc::InfoTagMusic::setArtist (   ...)

{ setArtist(artist) } Set the artist(s) of the music item.

Parameters
artiststring - Artist(s).

New function added.

◆ setComment()

void XBMCAddon::xbmc::InfoTagMusic::setComment (   ...)

{ setComment(comment) } Set the comment of the music item.

Parameters
commentstring - Comment.

New function added.

◆ setDbId()

void XBMCAddon::xbmc::InfoTagMusic::setDbId (   ...)

{ setDbId(dbId, type) } Set the database identifier of the music item.

Parameters
dbIdinteger - Database identifier.
typestring - Media type of the item.

New function added.

◆ setDisc()

void XBMCAddon::xbmc::InfoTagMusic::setDisc (   ...)

{ setDisc(disc) } Set the disc number of the song.

Parameters
discinteger - Disc number.

New function added.

◆ setDuration()

void XBMCAddon::xbmc::InfoTagMusic::setDuration (   ...)

{ setDuration(duration) } Set the duration of the song.

Parameters
durationinteger - Duration in seconds.

New function added.

◆ setGenres()

void XBMCAddon::xbmc::InfoTagMusic::setGenres (   ...)

{ setGenres(genres) } Set the genres of the music item.

Parameters
genreslist - Genres.

New function added.

◆ setLastPlayed()

void XBMCAddon::xbmc::InfoTagMusic::setLastPlayed (   ...)

{ setLastPlayed(lastPlayed) } Set the last played date of the music item.

Parameters
lastPlayedstring - Last played date (YYYY-MM-DD HH:MM:SS).

New function added.

◆ setListeners()

void XBMCAddon::xbmc::InfoTagMusic::setListeners (   ...)

{ setListeners(listeners) } Set the number of listeners of the music item.

Parameters
listenersinteger - Number of listeners.

New function added.

◆ setLyrics()

void XBMCAddon::xbmc::InfoTagMusic::setLyrics (   ...)

{ setLyrics(lyrics) } Set the lyrics of the song.

Parameters
lyricsstring - Lyrics.

New function added.

◆ setMediaType()

void XBMCAddon::xbmc::InfoTagMusic::setMediaType (   ...)

{ setMediaType(mediaType) } Set the media type of the music item.

Parameters
mediaTypestring - Media type.

New function added.

◆ setMusicBrainzAlbumArtistID()

void XBMCAddon::xbmc::InfoTagMusic::setMusicBrainzAlbumArtistID (   ...)

{ setMusicBrainzAlbumArtistID(musicBrainzAlbumArtistID) } Set the MusicBrainz album artist IDs of the music item.

Parameters
musicBrainzAlbumArtistIDlist - MusicBrainz album artist IDs.

New function added.

◆ setMusicBrainzAlbumID()

void XBMCAddon::xbmc::InfoTagMusic::setMusicBrainzAlbumID (   ...)

{ setMusicBrainzAlbumID(musicBrainzAlbumID) } Set the MusicBrainz album ID of the music item.

Parameters
musicBrainzAlbumIDstring - MusicBrainz album ID.

New function added.

◆ setMusicBrainzArtistID()

void XBMCAddon::xbmc::InfoTagMusic::setMusicBrainzArtistID (   ...)

{ setMusicBrainzArtistID(musicBrainzArtistID) } Set the MusicBrainz artist IDs of the music item.

Parameters
musicBrainzArtistIDlist - MusicBrainz artist IDs.

New function added.

◆ setMusicBrainzReleaseGroupID()

void XBMCAddon::xbmc::InfoTagMusic::setMusicBrainzReleaseGroupID (   ...)

{ setMusicBrainzReleaseGroupID(musicBrainzReleaseGroupID) } Set the MusicBrainz release group ID of the music item.

Parameters
musicBrainzReleaseGroupIDstring - MusicBrainz release group ID.

New function added.

◆ setMusicBrainzTrackID()

void XBMCAddon::xbmc::InfoTagMusic::setMusicBrainzTrackID (   ...)

{ setMusicBrainzTrackID(musicBrainzTrackID) } Set the MusicBrainz track ID of the song.

Parameters
musicBrainzTrackIDstring - MusicBrainz track ID.

New function added.

◆ setPlayCount()

void XBMCAddon::xbmc::InfoTagMusic::setPlayCount (   ...)

{ setPlayCount(playcount) } Set the playcount of the music item.

Parameters
playcountinteger - Playcount.

New function added.

◆ setRating()

void XBMCAddon::xbmc::InfoTagMusic::setRating (   ...)

{ setRating(rating) } Set the rating of the music item.

Parameters
ratingfloat - Rating.

New function added.

◆ setReleaseDate()

void XBMCAddon::xbmc::InfoTagMusic::setReleaseDate (   ...)

{ setReleaseDate(releaseDate) } Set the release date of the music item.

Parameters
releaseDatestring - Release date in ISO8601 format (YYYY, YYYY-MM or YYYY-MM-DD).

New function added.

◆ setTitle()

void XBMCAddon::xbmc::InfoTagMusic::setTitle (   ...)

{ setTitle(title) } Set the title of the music item.

Parameters
titlestring - Title.

New function added.

◆ setTrack()

void XBMCAddon::xbmc::InfoTagMusic::setTrack (   ...)

{ setTrack(track) } Set the track number of the song.

Parameters
trackinteger - Track number.

New function added.

◆ setURL()

void XBMCAddon::xbmc::InfoTagMusic::setURL (   ...)

{ setURL(url) } Set the URL of the music item.

Parameters
urlstring - URL.

New function added.

◆ setUserRating()

void XBMCAddon::xbmc::InfoTagMusic::setUserRating (   ...)

{ setUserRating(userrating) } Set the user rating of the music item.

Parameters
userratinginteger - User rating.

New function added.

◆ setYear()

void XBMCAddon::xbmc::InfoTagMusic::setYear (   ...)

{ setYear(year) } Set the year of the music item.

Parameters
yearinteger - Year.

New function added.