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.
◆ setSortEpisode()
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.
◆ 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()
◆ 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
-
tvshowStatus | string - TV show status. |
- v20 Python API changes:
- New function added.
◆ setGenres()
◆ 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()
◆ 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()
◆ 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 |
art_type | 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")
...