Kodi Development 22.0
for Binary and Script based Add-Ons
 
Loading...
Searching...
No Matches
InfoTagVideo

Detailed Description

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()
...

Function Documentation

◆ InfoTagVideo()

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()

getDbId ( )

Function: getDbId()


Get identification number of tag in database

Returns
[integer] database id

v17 Python API changes
New function added.

◆ getDirector()

getDirector ( )

Function: getDirector()


Get film director who has made the film (if present).

Returns
[string] Film director name.

v20 Python API changes
Deprecated. Use getDirectors() instead.

◆ getDirectors()

getDirectors ( )

Function: getDirectors()


Get a list of film directors who have made the film (if present).

Returns
[list] List of film director names.

v20 Python API changes
New function added.

◆ getWritingCredits()

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()

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()

getGenre ( )

Function: getGenre()


To get the Video Genre if available.

Returns
[string] Genre name

v20 Python API changes
Deprecated. Use getGenres() instead.

◆ getGenres()

getGenres ( )

Function: getGenres()


Get the list of Video Genres if available.

Returns
[list] List of genres

v20 Python API changes
New function added.

◆ getTagLine()

getTagLine ( )

Function: getTagLine()


Get video tag line if available.

Returns
[string] Video tag line

◆ getPlotOutline()

getPlotOutline ( )

Function: getPlotOutline()


Get the outline plot of the video if present.

Returns
[string] Outline plot

◆ getPlot()

getPlot ( )

Function: getPlot()


Get the plot of the video if present.

Returns
[string] Plot

◆ getPictureURL()

getPictureURL ( )

Function: getPictureURL()


Get a picture URL of the video to show as screenshot.

Returns
[string] Picture URL

◆ getTitle()

getTitle ( )

Function: getTitle()


Get the video title.

Returns
[string] Video title

◆ getTVShowTitle()

getTVShowTitle ( )

Function: getTVShowTitle()


Get the video TV show title.

Returns
[string] TV show title

v17 Python API changes
New function added.

◆ getMediaType()

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()

getVotes ( )

Function: getVotes()


Get the video votes if available from video info tag.

Returns
[string] Votes

v20 Python API changes
Deprecated. Use getVotesAsInt() instead.

◆ getVotesAsInt()

getVotesAsInt ( type )

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()

getCast ( )

Function: getCast()


To get the cast of the video when available.

Returns
[string] Video casts

v20 Python API changes
Deprecated. Use getActors() instead.

◆ getActors()

getActors ( )

Function: getActors()


Get the cast of the video if available.

Returns
[list] List of actors

v20 Python API changes
New function added.

◆ getFile()

getFile ( )

Function: getFile()


To get the video file name.

Returns
[string] File name

◆ getPath()

getPath ( )

Function: getPath()


To get the path where the video is stored.

Returns
[string] Path

◆ getFilenameAndPath()

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()

getIMDBNumber ( )

Function: getIMDBNumber()


To get the IMDb number of the video (if present).

Returns
[string] IMDb number

◆ getSeason()

getSeason ( )

Function: getSeason()


To get season number of a series

Returns
[integer] season number

v17 Python API changes
New function added.

◆ getEpisode()

getEpisode ( )

Function: getEpisode()


To get episode number of a series

Returns
[integer] episode number

v17 Python API changes
New function added.

◆ getYear()

getYear ( )

Function: getYear()


Get production year of video if present.

Returns
[integer] Production Year

◆ getRating()

getRating ( type )

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()

getUserRating ( )

Function: getUserRating()


Get the user rating if present as integer.

Returns
[integer] The user rating of the video

◆ getPlayCount()

getPlayCount ( )

Function: getPlayCount()


To get the number of plays of the video.

Returns
[integer] Play Count

◆ getLastPlayed()

getLastPlayed ( )

Function: getLastPlayed()


Get the last played date / time as string.

Returns
[string] Last played date / time

v20 Python API changes
Deprecated. Use getLastPlayedAsW3C() instead.

◆ getLastPlayedAsW3C()

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()

getOriginalTitle ( )

Function: getOriginalTitle()


To get the original title of the video.

Returns
[string] Original title

◆ getPremiered()

getPremiered ( )

Function: getPremiered()


To get premiered date of the video, if available.

Returns
[string]

v20 Python API changes
Deprecated. Use getPremieredAsW3C() instead.

◆ getPremieredAsW3C()

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()

getFirstAired ( )

Function: getFirstAired()


Returns first aired date as string from info tag.

Returns
[string] First aired date

v20 Python API changes
Deprecated. Use getFirstAiredAsW3C() instead.

◆ getFirstAiredAsW3C()

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()

getTrailer ( )

Function: getTrailer()


To get the path where the trailer is stored.

Returns
[string] Trailer path

v17 Python API changes
New function added.

◆ getArtist()

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()

getAlbum ( )

Function: getAlbum()


To get the album name (for musicvideos)

Returns
[string] Album name

v18 Python API changes
New function added.

◆ getTrack()

getTrack ( )

Function: getTrack()


To get the track number (for musicvideos)

Returns
[int] Track number

v18 Python API changes
New function added.

◆ getDuration()

getDuration ( )

Function: getDuration()


To get the duration

Returns
[unsigned int] Duration

v18 Python API changes
New function added.

◆ getResumeTime()

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()

getUniqueID ( key )

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
keystring - 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()

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
uniqueidstring - 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()

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
valuesdictionary - 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()

setDbId ( ...)

Function: setDbId(dbid)


Set the database identifier of the video item.

Parameters
dbidinteger - Database identifier.

v20 Python API changes
New function added.

◆ setYear()

setYear ( ...)

Function: setYear(year)


Set the year of the video item.

Parameters
yearinteger - Year.

v20 Python API changes
New function added.

◆ setEpisode()

setEpisode ( ...)

Function: setEpisode(episode)


Set the episode number of the episode.

Parameters
episodeinteger - Episode number.

v20 Python API changes
New function added.

◆ setSeason()

setSeason ( ...)

Function: setSeason(season)


Set the season number of the video item.

Parameters
seasoninteger - Season number.

v20 Python API changes
New function added.

◆ setSortEpisode()

setSortEpisode ( ...)

Function: setSortEpisode(sortepisode)


Set the episode sort number of the episode.

Parameters
sortepisodeinteger - Episode sort number.

v20 Python API changes
New function added.

◆ setSortSeason()

setSortSeason ( ...)

Function: setSortSeason(sortseason)


Set the season sort number of the season.

Parameters
sortseasoninteger - Season sort number.

v20 Python API changes
New function added.

◆ setEpisodeGuide()

setEpisodeGuide ( ...)

Function: setEpisodeGuide(episodeguide)


Set the episode guide of the video item.

Parameters
episodeguidestring - Episode guide.

v20 Python API changes
New function added.

◆ setTop250()

setTop250 ( ...)

Function: setTop250(top250)


Set the top 250 number of the video item.

Parameters
top250integer - Top 250 number.

v20 Python API changes
New function added.

◆ setSetId()

setSetId ( ...)

Function: setSetId(setid)


Set the movie set identifier of the video item.

Parameters
setidinteger - Set identifier.

v20 Python API changes
New function added.

◆ setTrackNumber()

setTrackNumber ( ...)

Function: setTrackNumber(tracknumber)


Set the track number of the music video item.

Parameters
tracknumberinteger - Track number.

v20 Python API changes
New function added.

◆ setRating()

setRating ( ...)

Function: setRating(rating, [votes], [type], [isdefault])


Set the rating of the video item.

Parameters
ratingfloat - Rating number.
votesinteger - Number of votes.
typestring - Type of the rating.
isdefaultbool - Whether the rating is the default or not.

v20 Python API changes
New function added.

◆ setRatings()

setRatings ( ...)

Function: setRatings(ratings, [defaultrating])


Set the ratings of the video item.

Parameters
ratingsdictionary - ‘{ 'type’: (rating, votes) }`.
defaultratingstring - Type / Label of the default rating.

v20 Python API changes
New function added.

◆ setUserRating()

setUserRating ( ...)

Function: setUserRating(userrating)


Set the user rating of the video item.

Parameters
userratinginteger - User rating.

v20 Python API changes
New function added.

◆ setPlaycount()

setPlaycount ( ...)

Function: setPlaycount(playcount)


Set the playcount of the video item.

Parameters
playcountinteger - Playcount.

v20 Python API changes
New function added.

◆ setMpaa()

setMpaa ( ...)

Function: setMpaa(mpaa)


Set the MPAA rating of the video item.

Parameters
mpaastring - MPAA rating.

v20 Python API changes
New function added.

◆ setPlot()

setPlot ( ...)

Function: setPlot(plot)


Set the plot of the video item.

Parameters
plotstring - Plot.

v20 Python API changes
New function added.

◆ setPlotOutline()

setPlotOutline ( ...)

Function: setPlotOutline(plotoutline)


Set the plot outline of the video item.

Parameters
plotoutlinestring - Plot outline.

v20 Python API changes
New function added.

◆ setTitle()

setTitle ( ...)

Function: setTitle(title)


Set the title of the video item.

Parameters
titlestring - Title.

v20 Python API changes
New function added.

◆ setOriginalTitle()

setOriginalTitle ( ...)

Function: setOriginalTitle(originaltitle)


Set the original title of the video item.

Parameters
originaltitlestring - Original title.

v20 Python API changes
New function added.

◆ setSortTitle()

setSortTitle ( ...)

Function: setSortTitle(sorttitle)


Set the sort title of the video item.

Parameters
sorttitlestring - Sort title.

v20 Python API changes
New function added.

◆ setTagLine()

setTagLine ( ...)

Function: setTagLine(tagline)


Set the tagline of the video item.

Parameters
taglinestring - Tagline.

v20 Python API changes
New function added.

◆ setTvShowTitle()

setTvShowTitle ( ...)

Function: setTvShowTitle(tvshowtitle)


Set the TV show title of the video item.

Parameters
tvshowtitlestring - TV show title.

v20 Python API changes
New function added.

◆ setTvShowStatus()

setTvShowStatus ( ...)

Function: setTvShowStatus(tvshowstatus)


Set the TV show status of the video item.

Parameters
statusstring - TV show status.

v20 Python API changes
New function added.

◆ setGenres()

setGenres ( ...)

Function: setGenres(genre)


Set the genres of the video item.

Parameters
genrelist - Genres.

v20 Python API changes
New function added.

◆ setCountries()

setCountries ( ...)

Function: setCountries(countries)


Set the countries of the video item.

Parameters
countrieslist - Countries.

v20 Python API changes
New function added.

◆ setDirectors()

setDirectors ( ...)

Function: setDirectors(directors)


Set the directors of the video item.

Parameters
directorslist - Directors.

v20 Python API changes
New function added.

◆ setStudios()

setStudios ( ...)

Function: setStudios(studios)


Set the studios of the video item.

Parameters
studioslist - Studios.

v20 Python API changes
New function added.

◆ setWriters()

setWriters ( ...)

Function: setWriters(writers)


Set the writers of the video item.

Parameters
writerslist - Writers.

v20 Python API changes
New function added.

◆ setDuration()

setDuration ( ...)

Function: setDuration(duration)


Set the duration of the video item.

Parameters
durationinteger - Duration in seconds.

v20 Python API changes
New function added.

◆ setPremiered()

setPremiered ( ...)

Function: setPremiered(premiered)


Set the premiere date of the video item.

Parameters
premieredstring - Premiere date.

v20 Python API changes
New function added.

◆ setSet()

setSet ( ...)

Function: setSet(set)


Set the movie set (name) of the video item.

Parameters
setstring - Movie set (name).

v20 Python API changes
New function added.

◆ setSetOverview()

setSetOverview ( ...)

Function: setSetOverview(setoverview)


Set the movie set overview of the video item.

Parameters
setoverviewstring - Movie set overview.

v20 Python API changes
New function added.

◆ setTags()

setTags ( ...)

Function: setTags(tags)


Set the tags of the video item.

Parameters
tagslist - Tags.

v20 Python API changes
New function added.

◆ setVideoAssetTitle()

setVideoAssetTitle ( ...)

Function: setVideoAssetTitle(videoAssetTitle)


Set the video asset title of the item.

Parameters
videoAssetTitlestring - Video asset title.

v21 Python API changes
New function added.

◆ setProductionCode()

setProductionCode ( ...)

Function: setProductionCode(const String& productioncode)


Set the production code of the video item.

Parameters
productioncodestring - Production code.

v20 Python API changes
New function added.

◆ setFirstAired()

setFirstAired ( ...)

Function: setFirstAired(firstaired)


Set the first aired date of the video item.

Parameters
firstairedstring - First aired date.

v20 Python API changes
New function added.

◆ setLastPlayed()

setLastPlayed ( ...)

Function: setLastPlayed(lastplayed)


Set the last played date of the video item.

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

v20 Python API changes
New function added.

◆ setAlbum()

setAlbum ( ...)

Function: setAlbum(album)


Set the album of the video item.

Parameters
albumstring - Album.

v20 Python API changes
New function added.

◆ setVotes()

setVotes ( ...)

Function: setVotes(votes)


Set the number of votes of the video item.

Parameters
votesinteger - Number of votes.

v20 Python API changes
New function added.

◆ setTrailer()

setTrailer ( ...)

Function: setTrailer(trailer)


Set the trailer of the video item.

Parameters
trailerstring - Trailer.

v20 Python API changes
New function added.

◆ setPath()

setPath ( ...)

Function: setPath(path)


Set the path of the video item.

Parameters
pathstring - Path.

v20 Python API changes
New function added.

◆ setFilenameAndPath()

setFilenameAndPath ( ...)

Function: setFilenameAndPath(filenameandpath)


Set the filename and path of the video item.

Parameters
filenameandpathstring - Filename and path.

v20 Python API changes
New function added.

◆ setIMDBNumber()

setIMDBNumber ( ...)

Function: setIMDBNumber(imdbnumber)


Set the IMDb number of the video item.

Parameters
imdbnumberstring - IMDb number.

v20 Python API changes
New function added.

◆ setDateAdded()

setDateAdded ( ...)

Function: setDateAdded(dateadded)


Set the date added of the video item.

Parameters
dateaddedstring - Date added (YYYY-MM-DD HH:MM:SS).

v20 Python API changes
New function added.

◆ setMediaType()

setMediaType ( ...)

Function: setMediaType(mediatype)


Set the media type of the video item.

Parameters
mediatypestring - Media type.

v20 Python API changes
New function added.

◆ setShowLinks()

setShowLinks ( ...)

Function: setShowLinks(showlinks)


Set the TV show links of the movie.

Parameters
showlinkslist - TV show links.

v20 Python API changes
New function added.

◆ setArtists()

setArtists ( ...)

Function: setArtists(artists)


Set the artists of the music video item.

Parameters
artistslist - Artists.

v20 Python API changes
New function added.

◆ setCast()

setCast ( ...)

Function: setCast(actors)


Set the cast / actors of the video item.

Parameters
actorslist - Cast / Actors.

v20 Python API changes
New function added.

◆ setResumePoint()

setResumePoint ( ...)

Function: setResumePoint(time, [totaltime])


Set the resume point of the video item.

Parameters
timefloat - Resume point in seconds.
totaltimefloat - Total duration in seconds.

v20 Python API changes
New function added.

◆ addSeason()

addSeason ( ...)

Function: addSeason(number, [name])


Add a season with name. It needs at least the season number.

Parameters
numberint - the number of the season.
namestring - the name of the season. Default "".

v20 Python API changes
New function added.

Example:

...
# addSeason(number, name))
infotagvideo.addSeason(1, "Murder House")
...

◆ addSeasons()

addSeasons ( ...)

Function: addSeasons(namedseasons)


Add named seasons to the TV show.

Parameters
namedseasonslist - [ (season, name) ].

v20 Python API changes
New function added.

◆ addVideoStream()

addVideoStream ( ...)

Function: addVideoStream(stream)


Add a video stream to the video item.

Parameters
streamVideoStreamDetail - Video stream.

v20 Python API changes
New function added.

◆ addAudioStream()

addAudioStream ( ...)

Function: addAudioStream(stream)


Add an audio stream to the video item.

Parameters
streamAudioStreamDetail - Audio stream.

v20 Python API changes
New function added.

◆ addSubtitleStream()

addSubtitleStream ( ...)

Function: addSubtitleStream(stream)


Add a subtitle stream to the video item.

Parameters
streamSubtitleStreamDetail - Subtitle stream.

v20 Python API changes
New function added.

◆ addAvailableArtwork()

addAvailableArtwork ( ...)

Function: addAvailableArtwork(images)


Add an image to available artworks (needed for video scrapers)

Parameters
urlstring - image path url
arttypestring - 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")
...