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()
...
◆ getDbId()
Function: getDbId()
Get identification number of tag in database.
- Returns
- [integer] database id.
- v18 Python API changes:
- New function added.
◆ getURL()
Function: getURL()
Returns url of source as string from music info tag.
- Returns
- [string] Url of source
◆ getTitle()
Function: getTitle()
Returns the title from music as string on info tag.
- Returns
- [string] Music title
◆ 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.
◆ getArtist()
Function: getArtist()
Returns the artist from music as string if present.
- Returns
- [string] Music artist
◆ getAlbum()
Function: getAlbum()
Returns the album from music tag as string if present.
- Returns
- [string] Music album name
◆ getAlbumArtist()
Function: getAlbumArtist()
Returns the album artist from music tag as string if present.
- Returns
- [string] Music album artist name
◆ getGenre()
Function: getGenre()
Returns the genre name from music tag as string if present.
- Returns
- [string] Genre name
◆ getDuration()
Function: getDuration()
Returns the duration of music as integer from info tag.
- Returns
- [integer] Duration
◆ getRating()
Function: getRating()
Returns the scraped rating as integer.
- Returns
- [integer] Rating
◆ getUserRating()
Function: getUserRating()
Returns the user rating as integer (-1 if not existing)
- Returns
- [integer] User rating
◆ getTrack()
Function: getTrack()
Returns the track number (if present) from music info tag as integer.
- Returns
- [integer] Track number
◆ getDisc()
Function: getDisc()
Returns the disk number (if present) from music info tag as integer.
- Returns
- [integer] Disc number
◆ getReleaseDate()
Function: getReleaseDate()
Returns the release date as string from music info tag (if present).
- Returns
- [string] Release date
◆ getListeners()
Function: getListeners()
Returns the listeners as integer from music info tag.
- Returns
- [integer] Listeners
◆ getPlayCount()
Function: getPlayCount()
Returns the number of carried out playbacks.
- Returns
- [integer] Playback count
◆ getLastPlayed()
Function: getLastPlayed()
Returns last played time as string from music info tag.
- Returns
- [string] Last played date / time on tag
◆ getComment()
Function: getComment()
Returns comment as string from music info tag.
- Returns
- [string] Comment on tag
◆ getLyrics()
Function: getLyrics()
Returns a string from lyrics.
- Returns
- [string] Lyrics on tag
◆ getMusicBrainzTrackID()
getMusicBrainzTrackID |
( |
| ) |
|
Function: getMusicBrainzTrackID()
Returns the MusicBrainz Recording ID from music info tag (if present).
- Returns
- [string] MusicBrainz Recording ID
- v19 Python API changes:
- New function added.
◆ getMusicBrainzArtistID()
getMusicBrainzArtistID |
( |
| ) |
|
Function: getMusicBrainzArtistID()
Returns the MusicBrainz Artist IDs from music info tag (if present).
- Returns
- [list] MusicBrainz Artist IDs
- v19 Python API changes:
- New function added.
◆ getMusicBrainzAlbumID()
getMusicBrainzAlbumID |
( |
| ) |
|
Function: getMusicBrainzAlbumID()
Returns the MusicBrainz Release ID from music info tag (if present).
- Returns
- [string] MusicBrainz Release ID
- v19 Python API changes:
- New function added.
◆ getMusicBrainzReleaseGroupID()
getMusicBrainzReleaseGroupID |
( |
| ) |
|
Function: getMusicBrainzReleaseGroupID()
Returns the MusicBrainz Release Group ID from music info tag (if present).
- Returns
- [string] MusicBrainz Release Group ID
- v19 Python API changes:
- New function added.
◆ getMusicBrainzAlbumArtistID()
getMusicBrainzAlbumArtistID |
( |
| ) |
|
Function: getMusicBrainzAlbumArtistID()
Returns the MusicBrainz Release Artist IDs from music info tag (if present).
- Returns
- [list] MusicBrainz Release Artist IDs
- v19 Python API changes:
- New function added.