diff --git a/CAST_ROUTES.md b/CAST_ROUTES.md new file mode 100644 index 0000000..628d1a7 --- /dev/null +++ b/CAST_ROUTES.md @@ -0,0 +1,241 @@ +# 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= +``` + +**Example:** +```xml +Container(50).Update(plugin://script.skinvariables/?info=get_dbitem_movie_cast&dbid=$INFO[ListItem.DBID]) +``` + +### 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= +``` + +**Example:** +```xml +Container(50).Update(plugin://script.skinvariables/?info=get_dbitem_tvshow_cast&dbid=$INFO[ListItem.DBID]) +``` + +### 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= +``` + +**Example:** +```xml +Container(50).Update(plugin://script.skinvariables/?info=get_dbitem_episode_cast&dbid=$INFO[ListItem.DBID]) +``` + +## 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 + +```xml + + 100 + 200 + 1720 + 600 + 9000 + 9000 + 50 + 50 + horizontal + + + 10 + 10 + 180 + 270 + $INFO[ListItem.Art(thumb)] + scale + + + 10 + 285 + 180 + 30 + + font12 + white + center + + + 10 + 315 + 180 + 25 + + font10 + grey + center + + + + + 10 + 10 + 180 + 270 + $INFO[ListItem.Art(thumb)] + scale + colors/white.png + 5 + + + 10 + 285 + 180 + 30 + + font12_title + white + center + + + 10 + 315 + 180 + 25 + + font10 + grey + center + + + +``` + +### Updating Cast Container on Info Dialog Open + +```xml + +Container(50).Update(plugin://script.skinvariables/?info=get_dbitem_$INFO[ListItem.DBType]_cast&dbid=$INFO[ListItem.DBID]) +``` + +### Conditional Cast Display + +```xml + + + Integer.IsGreater(Container(50).NumItems,0) + + + + + + + +``` + +### Accessing Specific Cast Members + +```xml + + + + + + + - + diff --git a/resources/lib/plugin.py b/resources/lib/plugin.py index 253bd1a..38addc2 100644 --- a/resources/lib/plugin.py +++ b/resources/lib/plugin.py @@ -29,6 +29,15 @@ class Plugin(): 'get_dbitem_addon_details': { 'module_name': 'jurialmunkey.jrpcid', 'import_attr': 'ListGetAddonDetails'}, + 'get_dbitem_movie_cast': { + 'module_name': 'jurialmunkey.jrpcid', + 'import_attr': 'ListGetMovieCast'}, + 'get_dbitem_tvshow_cast': { + 'module_name': 'jurialmunkey.jrpcid', + 'import_attr': 'ListGetTVShowCast'}, + 'get_dbitem_episode_cast': { + 'module_name': 'jurialmunkey.jrpcid', + 'import_attr': 'ListGetEpisodeCast'}, 'get_number_sum': { 'module_name': 'resources.lib.lists.koditools', 'import_attr': 'ListGetNumberSum'},