Kodi's video info tag class.
Class: xbmc.InfoTagVideo([offscreen])
Access and / or modify the video metadata of a ListItem.
Example:
...
tag = xbmc.Player().getVideoInfoTag()
title = tag.getTitle()
file = tag.getFile()
...
◆ InfoTagVideo()
Function: xbmc.InfoTagVideo([offscreen])
Create a video 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 ). |
- v20 Python API changes
- Added offscreen argument.
Example:
...
videoinfo = xbmc.InfoTagVideo(offscreen=False)
...
◆ getDbId()
Function: getDbId()
Get identification number of tag in database
- Returns
- [integer] database id
- v17 Python API changes
- New function added.
◆ getDirector()
◆ getDirectors()
◆ getWritingCredits()
Function: getWritingCredits()
Get the writing credits if present from video info tag.
- Returns
- [string] Writing credits
- v20 Python API changes
- Deprecated. Use getWriters() instead.
◆ getWriters()
Function: getWriters()
Get the list of writers (if present) from video info tag.
- Returns
- [list] List of writers
- v20 Python API changes
- New function added.
◆ getGenre()
◆ getGenres()
◆ getTagLine()
Function: getTagLine()
Get video tag line if available.
- Returns
- [string] Video tag line
◆ getPlotOutline()
Function: getPlotOutline()
Get the outline plot of the video if present.
- Returns
- [string] Outline plot
◆ getPlot()
Function: getPlot()
Get the plot of the video if present.
- Returns
- [string] Plot
◆ getPictureURL()
Function: getPictureURL()
Get a picture URL of the video to show as screenshot.
- Returns
- [string] Picture URL
◆ getTitle()
Function: getTitle()
Get the video title.
- Returns
- [string] Video title
◆ getTVShowTitle()
Function: getTVShowTitle()
Get the video TV show title.
- Returns
- [string] TV show title
- v17 Python API changes
- New function added.
◆ getMediaType()
Function: getMediaType()
Get the media type of the video.
- Returns
- [string] media type
Available strings about media type for video:
String | Description |
video | For normal video |
set | For a selection of video |
musicvideo | To define it as music video |
movie | To define it as normal movie |
tvshow | If this is it defined as tvshow |
season | The type is used as a series season |
episode | The type is used as a series episode |
- v17 Python API changes
- New function added.
◆ getVotes()
◆ getVotesAsInt()
Function: getVotesAsInt([type])
Get the votes of the rating (if available) as an integer.
- Parameters
-
type | [opt] string - the type of the rating.
- Some rating type values (any string possible):
Label | Type |
imdb | string - type name |
tvdb | string - type name |
tmdb | string - type name |
anidb | string - type name |
|
- Returns
- [integer] Votes
- v20 Python API changes
- New function added.
◆ getCast()
◆ getActors()
Function: getActors()
Get the cast of the video if available.
- Returns
- [list] List of actors
- v20 Python API changes
- New function added.
◆ getFile()
Function: getFile()
To get the video file name.
- Returns
- [string] File name
◆ getPath()
Function: getPath()
To get the path where the video is stored.
- Returns
- [string] Path
◆ getFilenameAndPath()
Function: getFilenameAndPath()
To get the full path with filename where the video is stored.
- Returns
- [string] File name and Path
- v19 Python API changes
- New function added.
◆ getIMDBNumber()
Function: getIMDBNumber()
To get the
IMDb number of the video (if present).
- Returns
- [string] IMDb number
◆ getSeason()
Function: getSeason()
To get season number of a series
- Returns
- [integer] season number
- v17 Python API changes
- New function added.
◆ getEpisode()
Function: getEpisode()
To get episode number of a series
- Returns
- [integer] episode number
- v17 Python API changes
- New function added.
◆ getYear()
Function: getYear()
Get production year of video if present.
- Returns
- [integer] Production Year
◆ getRating()
Function: getRating([type])
Get the video rating if present as float (double where supported).
- Parameters
-
type | [opt] string - the type of the rating.
- Some rating type values (any string possible):
Label | Type |
imdb | string - type name |
tvdb | string - type name |
tmdb | string - type name |
anidb | string - type name |
|
- Returns
- [float] The rating of the video
- v20 Python API changes
- Optional
type
parameter added.
◆ getUserRating()
Function: getUserRating()
Get the user rating if present as integer.
- Returns
- [integer] The user rating of the video
◆ getPlayCount()
Function: getPlayCount()
To get the number of plays of the video.
- Returns
- [integer] Play Count
◆ getLastPlayed()
◆ getLastPlayedAsW3C()
Function: getLastPlayedAsW3C()
Get last played datetime as string in W3C format (YYYY-MM-DDThh:mm:ssTZD).
- Returns
- [string] Last played datetime (W3C)
- v20 Python API changes
- New function added.
◆ getOriginalTitle()
Function: getOriginalTitle()
To get the original title of the video.
- Returns
- [string] Original title
◆ getPremiered()
◆ getPremieredAsW3C()
Function: getPremieredAsW3C()
Get
premiered date as string in W3C format (YYYY-MM-DD).
- Returns
- [string] Premiered date (W3C)
- v20 Python API changes
- New function added.
◆ getFirstAired()
◆ getFirstAiredAsW3C()
Function: getFirstAiredAsW3C()
Get first aired date as string in W3C format (YYYY-MM-DD).
- Returns
- [string] First aired date (W3C)
- v20 Python API changes
- New function added.
◆ getTrailer()
Function: getTrailer()
To get the path where the trailer is stored.
- Returns
- [string] Trailer path
- v17 Python API changes
- New function added.
◆ getArtist()
Function: getArtist()
To get the artist name (for musicvideos)
- Returns
- [std::vector<std::string>] Artist name
- v18 Python API changes
- New function added.
◆ getAlbum()
Function: getAlbum()
To get the album name (for musicvideos)
- Returns
- [string] Album name
- v18 Python API changes
- New function added.
◆ getTrack()
Function: getTrack()
To get the track number (for musicvideos)
- Returns
- [int] Track number
- v18 Python API changes
- New function added.
◆ getDuration()
Function: getDuration()
To get the duration
- Returns
- [unsigned int] Duration
- v18 Python API changes
- New function added.
◆ getResumeTime()
Function: getResumeTime())
Gets the resume time of the video item.
- Returns
- [double] Resume time
- v20 Python API changes
- New function added.
◆ getResumeTimeTotal()
getResumeTimeTotal |
( |
| ... | ) |
|
Function: getResumeTimeTotal())
Gets the total duration stored with the resume time of the video item.
- Returns
- [double] Total duration stored with the resume time
- v20 Python API changes
- New function added.
◆ getUniqueID()
Function: getUniqueID(key)
Get the unique ID of the given key. A unique ID is an identifier used by a (online) video database used to identify a video in its database.
- Parameters
-
key | string - uniqueID name.
- Some default uniqueID values (any string possible):
Label | Type |
imdb | string - uniqueid name |
tvdb | string - uniqueid name |
tmdb | string - uniqueid name |
anidb | string - uniqueid name |
|
- v20 Python API changes
- New function added.
◆ setUniqueID()
Function: setUniqueID(uniqueid, [type], [isdefault])
Set the given unique ID. A unique ID is an identifier used by a (online) video database used to identify a video in its database.
- Parameters
-
uniqueid | string - value of the unique ID. |
type | [opt] string - type / label of the unique ID. |
isdefault | [opt] bool - whether the given unique ID is the default unique ID. |
- v20 Python API changes
- New function added.
◆ setUniqueIDs()
Function: setUniqueIDs(values, defaultuniqueid)
Set the given unique IDs. A unique ID is an identifier used by a (online) video database used to identify a video in its database.
- Parameters
-
values | dictionary - pairs of ‘{ 'label’: 'value' }`. |
defaultuniqueid | [opt] string - the name of default uniqueID. |
- Some example values (any string possible):
Label | Type |
imdb | string - uniqueid name |
tvdb | string - uniqueid name |
tmdb | string - uniqueid name |
anidb | string - uniqueid name |
- v20 Python API changes
- New function added.
◆ setDbId()
Function: setDbId(dbid)
Set the database identifier of the video item.
- Parameters
-
dbid | integer - Database identifier. |
- v20 Python API changes
- New function added.
◆ setYear()
◆ setEpisode()
Function: setEpisode(episode)
Set the episode number of the episode.
- Parameters
-
episode | integer - Episode number. |
- v20 Python API changes
- New function added.
◆ setSeason()
Function: setSeason(season)
Set the season number of the video item.
- Parameters
-
season | integer - Season number. |
- v20 Python API changes
- New function added.
◆ setSortEpisode()
Function: setSortEpisode(sortepisode)
Set the episode sort number of the episode.
- Parameters
-
sortepisode | integer - Episode sort number. |
- v20 Python API changes
- New function added.
◆ setSortSeason()
Function: setSortSeason(sortseason)
Set the season sort number of the season.
- Parameters
-
sortseason | integer - Season sort number. |
- v20 Python API changes
- New function added.
◆ setEpisodeGuide()
Function: setEpisodeGuide(episodeguide)
Set the episode guide of the video item.
- Parameters
-
episodeguide | string - Episode guide. |
- v20 Python API changes
- New function added.
◆ setTop250()
Function: setTop250(top250)
Set the top 250 number of the video item.
- Parameters
-
top250 | integer - Top 250 number. |
- v20 Python API changes
- New function added.
◆ setSetId()
Function: setSetId(setid)
Set the movie set identifier of the video item.
- Parameters
-
setid | integer - Set identifier. |
- v20 Python API changes
- New function added.
◆ setTrackNumber()
Function: setTrackNumber(tracknumber)
Set the track number of the music video item.
- Parameters
-
tracknumber | integer - Track number. |
- v20 Python API changes
- New function added.
◆ setRating()
Function: setRating(rating, [votes], [type], [isdefault])
Set the rating of the video item.
- Parameters
-
rating | float - Rating number. |
votes | integer - Number of votes. |
type | string - Type of the rating. |
isdefault | bool - Whether the rating is the default or not. |
- v20 Python API changes
- New function added.
◆ setRatings()
Function: setRatings(ratings, [defaultrating])
Set the ratings of the video item.
- Parameters
-
ratings | dictionary - ‘{ 'type’: (rating, votes) }`. |
defaultrating | string - Type / Label of the default rating. |
- v20 Python API changes
- New function added.
◆ setUserRating()
Function: setUserRating(userrating)
Set the user rating of the video item.
- Parameters
-
userrating | integer - User rating. |
- v20 Python API changes
- New function added.
◆ setPlaycount()
Function: setPlaycount(playcount)
Set the playcount of the video item.
- Parameters
-
playcount | integer - Playcount. |
- v20 Python API changes
- New function added.
◆ setMpaa()
Function: setMpaa(mpaa)
Set the MPAA rating of the video item.
- Parameters
-
mpaa | string - MPAA rating. |
- v20 Python API changes
- New function added.
◆ setPlot()
◆ setPlotOutline()
Function: setPlotOutline(plotoutline)
Set the plot outline of the video item.
- Parameters
-
plotoutline | string - Plot outline. |
- v20 Python API changes
- New function added.
◆ setTitle()
Function: setTitle(title)
Set the title of the video item.
- Parameters
-
- v20 Python API changes
- New function added.
◆ setOriginalTitle()
Function: setOriginalTitle(originaltitle)
Set the original title of the video item.
- Parameters
-
originaltitle | string - Original title. |
- v20 Python API changes
- New function added.
◆ setSortTitle()
Function: setSortTitle(sorttitle)
Set the sort title of the video item.
- Parameters
-
sorttitle | string - Sort title. |
- v20 Python API changes
- New function added.
◆ setTagLine()
Function: setTagLine(tagline)
Set the tagline of the video item.
- Parameters
-
- v20 Python API changes
- New function added.
◆ setTvShowTitle()
Function: setTvShowTitle(tvshowtitle)
Set the TV show title of the video item.
- Parameters
-
tvshowtitle | string - TV show title. |
- v20 Python API changes
- New function added.
◆ setTvShowStatus()
Function: setTvShowStatus(tvshowstatus)
Set the TV show status of the video item.
- Parameters
-
status | string - TV show status. |
- v20 Python API changes
- New function added.
◆ setGenres()
Function: setGenres(genre)
Set the genres of the video item.
- Parameters
-
- v20 Python API changes
- New function added.
◆ setCountries()
Function: setCountries(countries)
Set the countries of the video item.
- Parameters
-
countries | list - Countries. |
- v20 Python API changes
- New function added.
◆ setDirectors()
Function: setDirectors(directors)
Set the directors of the video item.
- Parameters
-
directors | list - Directors. |
- v20 Python API changes
- New function added.
◆ setStudios()
Function: setStudios(studios)
Set the studios of the video item.
- Parameters
-
- v20 Python API changes
- New function added.
◆ setWriters()
Function: setWriters(writers)
Set the writers of the video item.
- Parameters
-
- v20 Python API changes
- New function added.
◆ setDuration()
Function: setDuration(duration)
Set the duration of the video item.
- Parameters
-
duration | integer - Duration in seconds. |
- v20 Python API changes
- New function added.
◆ setPremiered()
Function: setPremiered(premiered)
Set the premiere date of the video item.
- Parameters
-
premiered | string - Premiere date. |
- v20 Python API changes
- New function added.
◆ setSet()
Function: setSet(set)
Set the movie set (name) of the video item.
- Parameters
-
set | string - Movie set (name). |
- v20 Python API changes
- New function added.
◆ setSetOverview()
Function: setSetOverview(setoverview)
Set the movie set overview of the video item.
- Parameters
-
setoverview | string - Movie set overview. |
- v20 Python API changes
- New function added.
◆ setTags()
◆ setVideoAssetTitle()
setVideoAssetTitle |
( |
| ... | ) |
|
Function: setVideoAssetTitle(videoAssetTitle)
Set the video asset title of the item.
- Parameters
-
videoAssetTitle | string - Video asset title. |
- v21 Python API changes
- New function added.
◆ setProductionCode()
Function: setProductionCode(const String& productioncode)
Set the production code of the video item.
- Parameters
-
productioncode | string - Production code. |
- v20 Python API changes
- New function added.
◆ setFirstAired()
Function: setFirstAired(firstaired)
Set the first aired date of the video item.
- Parameters
-
firstaired | string - First aired date. |
- v20 Python API changes
- New function added.
◆ setLastPlayed()
Function: setLastPlayed(lastplayed)
Set the last played date of the video item.
- Parameters
-
lastplayed | string - Last played date (YYYY-MM-DD HH:MM:SS). |
- v20 Python API changes
- New function added.
◆ setAlbum()
Function: setAlbum(album)
Set the album of the video item.
- Parameters
-
- v20 Python API changes
- New function added.
◆ setVotes()
Function: setVotes(votes)
Set the number of votes of the video item.
- Parameters
-
votes | integer - Number of votes. |
- v20 Python API changes
- New function added.
◆ setTrailer()
Function: setTrailer(trailer)
Set the trailer of the video item.
- Parameters
-
- v20 Python API changes
- New function added.
◆ setPath()
◆ setFilenameAndPath()
setFilenameAndPath |
( |
| ... | ) |
|
Function: setFilenameAndPath(filenameandpath)
Set the filename and path of the video item.
- Parameters
-
filenameandpath | string - Filename and path. |
- v20 Python API changes
- New function added.
◆ setIMDBNumber()
Function: setIMDBNumber(imdbnumber)
Set the IMDb number of the video item.
- Parameters
-
imdbnumber | string - IMDb number. |
- v20 Python API changes
- New function added.
◆ setDateAdded()
Function: setDateAdded(dateadded)
Set the date added of the video item.
- Parameters
-
dateadded | string - Date added (YYYY-MM-DD HH:MM:SS). |
- v20 Python API changes
- New function added.
◆ setMediaType()
Function: setMediaType(mediatype)
Set the media type of the video item.
- Parameters
-
mediatype | string - Media type. |
- v20 Python API changes
- New function added.
◆ setShowLinks()
Function: setShowLinks(showlinks)
Set the TV show links of the movie.
- Parameters
-
showlinks | list - TV show links. |
- v20 Python API changes
- New function added.
◆ setArtists()
Function: setArtists(artists)
Set the artists of the music video item.
- Parameters
-
- v20 Python API changes
- New function added.
◆ setCast()
Function: setCast(actors)
Set the cast / actors of the video item.
- Parameters
-
actors | list - Cast / Actors. |
- v20 Python API changes
- New function added.
◆ setResumePoint()
Function: setResumePoint(time, [totaltime])
Set the resume point of the video item.
- Parameters
-
time | float - Resume point in seconds. |
totaltime | float - Total duration in seconds. |
- v20 Python API changes
- New function added.
◆ addSeason()
Function: addSeason(number, [name])
Add a season with name. It needs at least the season number.
- Parameters
-
number | int - the number of the season. |
name | string - the name of the season. Default "". |
- v20 Python API changes
- New function added.
Example:
...
infotagvideo.addSeason(1, "Murder House")
...
◆ addSeasons()
Function: addSeasons(namedseasons)
Add named seasons to the TV show.
- Parameters
-
namedseasons | list - [ (season, name) ] . |
- v20 Python API changes
- New function added.
◆ addVideoStream()
Function: addVideoStream(stream)
Add a video stream to the video item.
- Parameters
-
- v20 Python API changes
- New function added.
◆ addAudioStream()
Function: addAudioStream(stream)
Add an audio stream to the video item.
- Parameters
-
- v20 Python API changes
- New function added.
◆ addSubtitleStream()
Function: addSubtitleStream(stream)
Add a subtitle stream to the video item.
- Parameters
-
- v20 Python API changes
- New function added.
◆ addAvailableArtwork()
addAvailableArtwork |
( |
| ... | ) |
|
Function: addAvailableArtwork(images)
Add an image to available artworks (needed for video scrapers)
- Parameters
-
url | string - image path url |
arttype | string - image type |
preview | [opt] string - image preview path url |
referrer | [opt] string - referrer url |
cache | [opt] string - filename in cache |
post | [opt] bool - use post to retrieve the image (default false) |
isgz | [opt] bool - use gzip to retrieve the image (default false) |
season | [opt] integer - number of season in case of season thumb |
- v20 Python API changes
- New function added.
Example:
...
infotagvideo.addAvailableArtwork(path_to_image_1, "thumb")
...