Skip to content

Conversation

@heros-os
Copy link

@heros-os heros-os commented Jan 3, 2026

Add cast container routes to resolve issue #1553

Cast Container Routes

Overview

Script.skinvariables now provides routes to populate containers with cast information from Kodi's local database. This addresses issue #1553 by enabling cast display when using call_auto with add_dbid.

Available Routes

Movie Cast

Retrieves cast information for a movie by its database ID.

Route: get_dbitem_movie_cast

URL Format:

plugin://script.skinvariables/?info=get_dbitem_movie_cast&dbid=<movieid>

Example:

<onclick>Container(50).Update(plugin://script.skinvariables/?info=get_dbitem_movie_cast&dbid=$INFO[ListItem.DBID])</onclick>

TV Show Cast

Retrieves cast information for a TV show by its database ID.

Route: get_dbitem_tvshow_cast

URL Format:

plugin://script.skinvariables/?info=get_dbitem_tvshow_cast&dbid=<tvshowid>

Example:

<onclick>Container(50).Update(plugin://script.skinvariables/?info=get_dbitem_tvshow_cast&dbid=$INFO[ListItem.DBID])</onclick>

Episode Cast

Retrieves cast information for an episode by its database ID.

Route: get_dbitem_episode_cast

URL Format:

plugin://script.skinvariables/?info=get_dbitem_episode_cast&dbid=<episodeid>

Example:

<onclick>Container(50).Update(plugin://script.skinvariables/?info=get_dbitem_episode_cast&dbid=$INFO[ListItem.DBID])</onclick>

Cast ListItem Properties

Each cast member in the container has the following properties:

Property Description Example
Label Actor name "Robert Downey Jr."
Label2 Character/Role name "Tony Stark"
Art(thumb) Actor thumbnail image "image://http%3a%2f%2f..."
Property(name) Actor name (property) "Robert Downey Jr."
Property(role) Character name (property) "Tony Stark"
Property(order) Cast order "0"
Property(index) Zero-based index "0"
Property(thumbnail) Actor thumbnail URL "image://http%3a%2f%2f..."

Skin XML Examples

Basic Cast List

<control type="list" id="50">
    <left>100</left>
    <top>200</top>
    <width>1720</width>
    <height>600</height>
    <onleft>9000</onleft>
    <onright>9000</onright>
    <onup>50</onup>
    <ondown>50</ondown>
    <orientation>horizontal</orientation>
    <itemlayout width="200" height="300">
        <control type="image">
            <left>10</left>
            <top>10</top>
            <width>180</width>
            <height>270</height>
            <texture>$INFO[ListItem.Art(thumb)]</texture>
            <aspectratio>scale</aspectratio>
        </control>
        <control type="label">
            <left>10</left>
            <top>285</top>
            <width>180</width>
            <height>30</height>
            <label>$INFO[ListItem.Label]</label>
            <font>font12</font>
            <textcolor>white</textcolor>
            <align>center</align>
        </control>
        <control type="label">
            <left>10</left>
            <top>315</top>
            <width>180</width>
            <height>25</height>
            <label>$INFO[ListItem.Label2]</label>
            <font>font10</font>
            <textcolor>grey</textcolor>
            <align>center</align>
        </control>
    </itemlayout>
    <focusedlayout width="200" height="300">
        <control type="image">
            <left>10</left>
            <top>10</top>
            <width>180</width>
            <height>270</height>
            <texture>$INFO[ListItem.Art(thumb)]</texture>
            <aspectratio>scale</aspectratio>
            <bordertexture border="5">colors/white.png</bordertexture>
            <bordersize>5</bordersize>
        </control>
        <control type="label">
            <left>10</left>
            <top>285</top>
            <width>180</width>
            <height>30</height>
            <label>$INFO[ListItem.Label]</label>
            <font>font12_title</font>
            <textcolor>white</textcolor>
            <align>center</align>
        </control>
        <control type="label">
            <left>10</left>
            <top>315</top>
            <width>180</width>
            <height>25</height>
            <label>$INFO[ListItem.Label2]</label>
            <font>font10</font>
            <textcolor>grey</textcolor>
            <align>center</align>
        </control>
    </focusedlayout>
</control>

Updating Cast Container on Info Dialog Open

<!-- In DialogVideoInfo.xml -->
<onload>Container(50).Update(plugin://script.skinvariables/?info=get_dbitem_$INFO[ListItem.DBType]_cast&dbid=$INFO[ListItem.DBID])</onload>

Conditional Cast Display

<!-- Show cast list only when container has items -->
<control type="group">
    <visible>Integer.IsGreater(Container(50).NumItems,0)</visible>
    <control type="label>
        <label>Cast</label>
    </control>
    <control type="list" id="50">
        <!-- cast list control -->
    </control>
</control>

Accessing Specific Cast Members

<!-- First cast member -->
<control type="label>
    <label>$INFO[Container(50).ListItem(0).Label]</label>
</control>

<!-- Second cast member -->
<control type="label>
    <label>$INFO[Container(50).ListItem(1).Label]</label>
</control>

<!-- Number of cast members -->
<control type="label>
    <label>Cast: $INFO[Container(50).NumItems]</label>
</control>

Integration with TMDb Helper

When using with plugin.video.themoviedb.helper's call_auto feature:

<onclick>RunScript(plugin.video.themoviedb.helper,add_dbid=$INFO[ListItem.DBID],tmdb_type=movie,call_auto=1190)</onclick>

The cast container will now be properly populated when the info dialog opens, thanks to the new cast routes.

Requirements

  • script.skinvariables: v2.1.35+
  • script.module.jurialmunkey: v0.2.30+
  • Kodi Version: 19+ (Nexus)

Notes

  • Cast data is retrieved from Kodi's local database
  • No external API calls are made
  • Cast members are ordered by their billing order (as scraped)
  • If a movie/show has no cast data, the container will be empty
  • Thumbnails are automatically loaded from Kodi's artwork cache

Troubleshooting

Container not populating:

  • Verify the container ID (50 in examples) exists in your skin XML
  • Check that the media item has cast data in the Kodi library
  • Ensure script.module.jurialmunkey is updated to v0.2.30 or higher

Thumbnails not showing:

  • Verify artwork scrapers are enabled in Kodi settings
  • Check that Kodi's artwork downloader has run
  • Ensure sufficient cache space for artwork

Wrong cast information:

  • Verify the correct info parameter is used (movie_cast vs tvshow_cast vs episode_cast)
  • Check that the correct DBID is being passed
  • Rescrape the media item if data appears incorrect

Related Issues

  • Issue #1553 - Empty Cast Container with call_auto and add_dbid

Changelog

v2.1.35

  • Added get_dbitem_movie_cast route
  • Added get_dbitem_tvshow_cast route
  • Added get_dbitem_episode_cast route
  • Updated dependency on script.module.jurialmunkey to v0.2.30

- Added three new routes for cast containers:
  - get_dbitem_movie_cast (ListGetMovieCast)
  - get_dbitem_tvshow_cast (ListGetTVShowCast)
  - get_dbitem_episode_cast (ListGetEpisodeCast)

- Updated addon version from 2.1.34 to 2.1.35
- Updated dependency on script.module.jurialmunkey to v0.2.30

- Added comprehensive documentation in CAST_ROUTES.md with:
  - Route usage examples
  - ListItem properties reference
  - Skin XML examples
  - Troubleshooting guide

This enables skinners to populate containers with cast information
from Kodi's local database when using call_auto with add_dbid.
Add cast container routes to resolve issue #1553
Copilot AI review requested due to automatic review settings January 3, 2026 15:28
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds three new container routes to script.skinvariables that enable skins to populate containers with cast information retrieved from Kodi's local database. This resolves issue #1553 by allowing cast data to be displayed when using TMDb Helper's call_auto feature with add_dbid.

Key Changes:

  • Added three new cast retrieval routes: get_dbitem_movie_cast, get_dbitem_tvshow_cast, and get_dbitem_episode_cast
  • Updated dependency requirement for script.module.jurialmunkey from v0.2.28 to v0.2.30
  • Comprehensive documentation added in CAST_ROUTES.md with usage examples

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
resources/lib/plugin.py Adds three new route definitions for movie, TV show, and episode cast retrieval, mapping to jurialmunkey.jrpcid module classes
addon.xml Bumps addon version to 2.1.35 and updates script.module.jurialmunkey dependency to v0.2.30
CAST_ROUTES.md Provides comprehensive documentation for the new cast routes including API details, ListItem properties, XML examples, integration instructions, and troubleshooting guidance

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

</control>

<!-- Second cast member -->
<control type="label>
Copy link

Copilot AI Jan 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing closing double quote in the XML opening tag. The attribute 'type' should be properly quoted as 'type="label"' instead of 'type="label>'.

Copilot uses AI. Check for mistakes.
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot open a new pull request to apply changes based on this feedback

</control>
<!-- Number of cast members -->
<control type="label>
Copy link

Copilot AI Jan 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing closing double quote in the XML opening tag. The attribute 'type' should be properly quoted as 'type="label"' instead of 'type="label>'.

Copilot uses AI. Check for mistakes.
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot open a new pull request to apply changes based on this feedback

```xml
<!-- First cast member -->
<control type="label>
Copy link

Copilot AI Jan 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing closing double quote in the XML opening tag. The attribute 'type' should be properly quoted as 'type="label"' instead of 'type="label>'.

Copilot uses AI. Check for mistakes.
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot open a new pull request to apply changes based on this feedback

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove this file. Documentation should be done in the Wiki not as files.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
```xml
<!-- First cast member -->
<control type="label>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove this file. Documentation should be done in the Wiki not as files.

<?xml version="1.0" encoding="UTF-8"?>
<addon id="script.skinvariables"
version="2.1.34"
version="2.1.35"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please revert this version bump. Version bumps should be done as a separate commit when a release is made not when the code base changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants