Release plugin.video.themoviedb.helper - Access to TheMovieDb API for Skinners
(2019-09-08, 01:24)bsoriano Wrote:
(2019-09-08, 00:30)jurialmunkey Wrote:
(2019-09-07, 14:47)bsoriano Wrote: I have set the language to English (United States of America). The title of the item in the list matches the main title as far as I can see. I have no idea about what is going on. Obviously it is a skin problem, since in the Leia install I just did from scratch, when I switch to Arctic Zephyr 2 it works exactly as expected, the exclusions work. I know this is perhaps too much to ask, but could you please take a look at my code when you have a chance and let me know some pointers of what I could do differently or where you see I am making mistakes that would lead to this poor performance or the issue with the exclusions?
Here you go:
https://github.com/bartolomesoriano/skin.amber/pull/7

The exclusions weren't working because you were using $ESCINFO[] which encases the string in quotation marks ""
$ESCINFO is only for scripts/built-ins which might get confused by a label with commas in them and think that it is splitting an argument. Commas don't matter for a plugin because the path is passed to the plugin as a paramstring.

I also don't know why you were building the lists based off your hidden detailed item. Using infolabels from the detailed item would slow down your info because you are waiting for that to build first, when library items will already have ListItem.Director / Studio / Genre etc.

It would be best to use a variable to check !String.IsEmpty(ListItem.Director) and use ListItem.Director first, then only fallback to the detailed item if no director is available.
(2019-09-07, 14:47)bsoriano Wrote: I also noticed in my skin that on first use of the plugin (pressing I on an item from one of the plugin widgets), I don't get all custom lists, in particular I don't get the cast. I have to press I on another movie and then I get the cast. Also, I don't understand why my code is so slow when showing online information. You have to wait quite a few seconds for the cast to appear, whereas in your skin the cast is already there from the first second.
I don't use a hidden detailed item to populate cast or a separate cast-list call. I just use the built-in id="50" class list in dialogvideoinfo. So that's why mines much faster - because I'm not doing any separate look-up.

In the detailed item, I fill the default cast list in addition to the individual properties. Because the custom window calls the info dialog on the detailed item, then the default id="50" list will be filled with cast. The only time you won't get cast is if you are using a TMDbHelper list as a widget because cast info isn't available for lists (e.g. Popular Movies etc.). However, if any list item already has a detailed version cached, then I will merge the info. 
@jurialmunkey, thank you so much for your help and the explanations.

I will go back to the drawing board with my cast panel to use the info from container 50, since with what you mention, this container will have the cast for online or local items. I imagine that, while a bit slower, I can use a custom cast panel that gets the info from container 50, so I can have my custom onclick and allow the user to search either online or locally for the person's info.

Thanks again! Smile

Regards,

Bart

No worries.

What I would probably do is still have the additional cast list from the detailed item but only show it if the id=50 cast list has no items. You may as well use the additional cast list since you are going to be getting the detailed item anyway. That way you get the best of both - quick loading if it exists and the detailed look-up if it doesn't.

You could use similar variables for your movies featuring cast list to check if you have something in id=50 and use that if available, but fallback to the detailed item if not available.
Arctic Fuse - Alpha now available. Support me on Ko-fi.
Reply


Messages In This Thread
RE: TheMovieDB Helper - by jurialmunkey - 2019-07-31, 11:47
RE: plugin.video.themoviedb.helper - Access to TheMovieDb API for Skinners - by jurialmunkey - 2019-09-08, 01:49
Logout Mark Read Team Forum Stats Members Help
plugin.video.themoviedb.helper - Access to TheMovieDb API for Skinners2