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

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

Classes

class  XBMCAddon::xbmc::InfoTagMusic
 

Functions

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

Function: getDbId()


Get identification number of tag in database. More...

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

Function: getURL()


Returns url of source as string from music info tag. More...

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

Function: getTitle()


Returns the title from music as string on info tag. More...

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

Function: getMediaType()


Get the media type of the music item. More...

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

Function: getArtist()


Returns the artist from music as string if present. More...

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

Function: getAlbum()


Returns the album from music tag as string if present. More...

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

Function: getAlbumArtist()


More...
 
 XBMCAddon::xbmc::InfoTagMusic::getGenre ()
 

Function: getGenre()


Returns the genre name from music tag as string if present. More...

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

Function: getDuration()


Returns the duration of music as integer from info tag. More...

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

Function: getRating()


Returns the scraped rating as integer. More...

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

Function: getUserRating()


Returns the user rating as integer (-1 if not existing) More...

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

Function: getTrack()


Returns the track number (if present) from music info tag as integer. More...

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

Function: getDisc()


Returns the disk number (if present) from music info tag as integer. More...

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

Function: getReleaseDate()


Returns the release date as string from music info tag (if present). More...

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

Function: getListeners()


Returns the listeners as integer from music info tag. More...

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

Function: getPlayCount()


Returns the number of carried out playbacks. More...

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

Function: getLastPlayed()


Returns last played time as string from music info tag. More...

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

Function: getComment()


Returns comment as string from music info tag. More...

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

Function: getLyrics()


Returns a string from lyrics. More...

 

Detailed Description

Kodi's music info tag class.

Class: InfoTagMusic()

To get music info tag data of currently played source.

Note
Info tag load is only be possible from present player class.

Example:

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

Function Documentation

§ getAlbum()

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

Function: getAlbum()


Returns the album from music tag as string if present.

Returns
[string] Music album name

§ getAlbumArtist()

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

Function: getAlbumArtist()


Returns the album artist from music tag as string if present.

Returns
[string] Music album artist name

§ getArtist()

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

Function: getArtist()


Returns the artist from music as string if present.

Returns
[string] Music artist

§ getComment()

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

Function: getComment()


Returns comment as string from music info tag.

Returns
[string] Comment on tag

§ getDbId()

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

Function: getDbId()


Get identification number of tag in database.

Returns
[integer] database id.

v17 Python API changes:
New function added.

§ getDisc()

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

Function: getDisc()


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

Returns
[integer] Disc number

§ getDuration()

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

Function: getDuration()


Returns the duration of music as integer from info tag.

Returns
[integer] Duration

§ getGenre()

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

Function: getGenre()


Returns the genre name from music tag as string if present.

Returns
[string] Genre name

§ getLastPlayed()

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

Function: getLastPlayed()


Returns last played time as string from music info tag.

Returns
[string] Last played date / time on tag

§ getListeners()

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

Function: getListeners()


Returns the listeners as integer from music info tag.

Returns
[integer] Listeners

§ getLyrics()

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

Function: getLyrics()


Returns a string from lyrics.

Returns
[string] Lyrics on tag

§ getMediaType()

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

Function: 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

v18 Python API changes:
New function added.

§ getPlayCount()

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

Function: getPlayCount()


Returns the number of carried out playbacks.

Returns
[integer] Playback count

§ getRating()

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

Function: getRating()


Returns the scraped rating as integer.

Returns
[integer] Rating

§ getReleaseDate()

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

Function: getReleaseDate()


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

Returns
[string] Release date

§ getTitle()

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

Function: getTitle()


Returns the title from music as string on info tag.

Returns
[string] Music title

§ getTrack()

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

Function: getTrack()


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

Returns
[integer] Track number

§ getURL()

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

Function: getURL()


Returns url of source as string from music info tag.

Returns
[string] Url of source

§ getUserRating()

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

Function: getUserRating()


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

Returns
[integer] User rating