Skip to content

DBID Lookup

jurialmunkey edited this page Feb 28, 2025 · 2 revisions

Get DBID Details

Retrieve additional details about an item from the library via JSON RPC.

Most values for the item will be available in normal infolabels e.g. ListItem.Genre or ListItem.Art() etc.

Additionally, values will be stored in ListItem.Property(PROPERTY) and many sub values can be referenced by index e.g. to split genres or cast etc.

plugin://script.skinvariables/?info=get_dbitem_movieset_details&dbid=DBID
plugin://script.skinvariables/?info=get_dbitem_movie_details&dbid=DBID
plugin://script.skinvariables/?info=get_dbitem_tvshow_details&dbid=DBID
plugin://script.skinvariables/?info=get_dbitem_season_details&dbid=DBID
plugin://script.skinvariables/?info=get_dbitem_episode_details&dbid=DBID
plugin://script.skinvariables/?info=get_dbitem_addon_details&dbid=DBID

πŸ’‘ Example: Get more details about a Movie

plugin://script.skinvariables/?info=get_dbitem_movie_details&dbid=$INFO[Container(50).ListItem.DBID]

πŸ“š Details retrieved for each dbtype

DBType Details
movie title plot playcount year trailer tagline originaltitle mpaa runtime set setid premiered dateadded genre director writer studio cast country fanart thumbnail art ratings streamdetails
tvshow title plot playcount year lastplayed premiered file originaltitle watchedepisodes dateadded genre studio cast fanart thumbnail art ratings
season title plot fanart thumbnail tvshowid art
episode title plot playcount firstaired runtime productioncode lastplayed dateadded tvshowid seasonid writer director cast fanart thumbnail art ratings streamdetails
set title plot playcount fanart thumbnail art
addon name version summary description path author thumbnail disclaimer fanart dependencies broken extrainfo rating enabled installed deprecated

πŸ“š Details are placed in properties

$INFO[Container(ID).ListItem.Property(plot)]
$INFO[Container(ID).ListItem.Property(title)]

πŸ“š Details with child attributes are referenced with a dot separator:

$INFO[Container(ID).ListItem.Property(ratings.imdb.rating)]
$INFO[Container(ID).ListItem.Property(ratings.imdb.votes)]

πŸ“š Details which can have multiple values are referenced by index:

$INFO[Container(ID).ListItem.Property(genre.0)]
$INFO[Container(ID).ListItem.Property(genre.1)]
$INFO[Container(ID).ListItem.Property(genre.count)]
$INFO[Container(ID).ListItem.Property(director.0)]
$INFO[Container(ID).ListItem.Property(director.1)]
$INFO[Container(ID).ListItem.Property(director.count)]

πŸ“š Details which can have multiple values with child attributes are referenced by index and dot notation:

$INFO[Container(ID).ListItem.Property(cast.0.name)]
$INFO[Container(ID).ListItem.Property(cast.0.role)]
$INFO[Container(ID).ListItem.Property(cast.0.thumbnail)]
$INFO[Container(ID).ListItem.Property(cast.1.name)]
$INFO[Container(ID).ListItem.Property(cast.1.role)]
$INFO[Container(ID).ListItem.Property(cast.1.thumbnail)]
$INFO[Container(ID).ListItem.Property(cast.count)]
$INFO[Container(ID).ListItem.Property(streamdetails.video.0.codec)]
$INFO[Container(ID).ListItem.Property(streamdetails.audio.0.channels)]

πŸ“š Sets also retrieve subdetails about each movieid inside the set

$INFO[Container(ID).ListItem.Property(movies.count)]
$INFO[Container(ID).ListItem.Property(movies.1.label)]
$INFO[Container(ID).ListItem.Property(movies.1.item.plot)]
$INFO[Container(ID).ListItem.Property(movies.1.item.art.fanart)]
$INFO[Container(ID).ListItem.Property(movies.1.item.ratings.imdb.rating)]
$INFO[Container(ID).ListItem.Property(movies.1.item.genre.0)]
$INFO[Container(ID).ListItem.Property(movies.1.item.cast.0.name)]
$INFO[Container(ID).ListItem.Property(movies.1.item.streamdetails.video.0.codec)]

πŸ“š Unique values from each subdetail item are also collected as a / separated list πŸ”– v2.1.24+

$INFO[Container(ID).ListItem.Property(director.collection)]
$INFO[Container(ID).ListItem.Property(director.collection.count)]
$INFO[Container(ID).ListItem.Property(movies.0.director.collection)]
$INFO[Container(ID).ListItem.Property(movies.0.director.collection.count)]
$INFO[Container(ID).ListItem.Property(genre.collection)]
$INFO[Container(ID).ListItem.Property(name.collection)]
$INFO[Container(ID).ListItem.Property(role.collection)]

πŸ“š Floating point values (e.g. for ratings) have additional affixes πŸ”– v2.1.16+

$INFO[Container(ID).ListItem.Property(ratings.imdb.rating)]
8.399999618530273

$INFO[Container(ID).ListItem.Property(ratings.imdb.rating_integer)]
8

$INFO[Container(ID).ListItem.Property(ratings.imdb.rating_rounded)]
8.4

$INFO[Container(ID).ListItem.Property(ratings.imdb.rating_percentage)]
84%

Reconstruct List from Dotted Properties

This method allows for collecting dotted properties from a ListItem - e.g. ListItem.Property(cast.X.name|role) - to reconstruct a list of items with those properties. Useful for a recreating a cast list from a DBID lookup.

πŸ”– v2.1.26+

πŸ’‘ Example: Reconstruct a cast list for movieset DBID lookup in container 5000

plugin://script.skinvariables/?info=get_dotted_properties
&source=Container(5000).ListItem
&string=movies.{x}.item.cast.{y}.
&infoproperties=name/role/thumbnail
&label=name
&thumb=thumbnail
&xmax=15
&ymax=20
&no_label_dupes=true
&reload=$INFO[Container(5000).ListItem.Label]
Parameter Description
source The base item to retrieve properties from. In the above example, we retrieve properties using $INFO[Container(5000).ListItem.Property()]
string The formatting string for the dotted properties. X/Y values will be replaced by a range. In the above example, we retrieve properties using $INFO[Container(5000).ListItem.Property(movies.{x}.item.cast.{y}.)]
infoproperties A slash / separated list of properties to retrieve using the formatting string. In the above example, we put $INFO[Container(5000).ListItem.Property(movies.{x}.item.cast.{y}.name)] into ListItem.Property(name) (and likewise for role/thumbnail)
label The matching infoproperty will also be used as the label. In the above example, we put ListItem.Property(name) into ListItem.Label
thumb The matching infoproperty will also be used as the thumb/icon. In the above example, we put ListItem.Property(thumbnail) into ListItem.Icon
fanart The matching infoproperty will also be used as the fanart. In the above example, this is not used but would function similar to thumb.
xmax The maximum {x} value to use. In the above example, we retrieve "movies.[0-14].item" values
ymax The maximum {y} value to use. Optional. Use only if {y} value is used. In the above example, we retrieve "cast.[0-19].name
no_label_dupes Skip re-adding items with the same label. Optional. In the above example, we avoid re-adding cast members who appear across multiple movies in a set to avoid duplicates.
reload Used to force Kodi to refresh the container. In the above example, we trigger a reload whenever our source container label changes as that indicates a new item in the source.

Clone this wiki locally