Kodi Community Forum

Full Version: Cast info in library
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Is there any chance ListItem.Cast could be made available outside of DialogVideoInfo? I would like to display it in the videolibrary, outside of the container
The problem with that is that retrieving the cast for all the items when browsing the video library requires at least 1 extra SQL query for every item in the list. So if you have 100 items you get 101 queries instead of just the one which retrieves all the items and the basic metadata available now. That would make the loading of all the items extremely slow. If you want to see the impact you can test it with jsonrpc by running
Code:
{ "jsonrpc": "2.0", "method": "VideoLibrary.GetMovies", "params": { "fields": [ "title" ] }, "id": 1 }
against
Code:
{ "jsonrpc": "2.0", "method": "VideoLibrary.GetMovies", "params": { "fields": [ "title", "cast" ] }, "id": 1 }
The first one is almost identical to what happens when you open the movie view and the second one is very similar to what would happen if we had to retrieve the cast for every item. In my movie library with approximately 500 movies the time to retrieve the items jumps from 2.5 seconds to about 12 seconds. Imagine you'd have to wait so long everytime you enter the movie views Wink

I'm sure that the queries to retrieve cast information could be optimized but it would still have a huge impact.
IMDB has listed "Stars" with the main actors besides the list with all actors. If the scraper could get updated to scrape also that info, it shouldn't have any effect on the loading time of the library. It would simply be a string available via ListItem.Stars or ListItem.Cast. But at the moment there's no chance of getting the info outside the videoinfo dialog.
IIRC someone (don't think it was djh) hacked something into Aeon or one of its mods to display the "starring actors" in library view.
From when I asked -

spiff Wrote:problem is it requires many extra queries which slows down the listing tons...

spiff Wrote:... eventually we'll add background fetching of info, then it will be avail in the listings as well (after a brief delay).
Thanks for the explanation and info guys, good to know this could be made possible when background fetching is implemented Smile
Does Boxee do any special that they get that info or do they only scrape like 3-5 names while I have some Movies with like 20 or so actors in my .nfo...
Does Boxee even show the actors in it's views?
Hitcher Wrote:Does Boxee even show the actors in it's views?

Definably their TV show section, I dont use Movies much, they have:

Title
Genre
Plot Textbox
Then below that they have "Starring" where they got 3 or so cast members
Any progress on this? has the background fetching been implemented on Frodo 12.2?