Release plugin.video.themoviedb.helper - Access to TheMovieDb API for Skinners
(2020-01-01, 14:33)nessus Wrote: > I send focus back to my default control (grouplist of dialog buttons). Has the added advantage of resetting the info dialog back to its default position.
Can you please be more specific on this?. I mean like in arctic zephyr code example.
Here's my onclick action for my info dialog lists: https://github.com/jurialmunkey/skin.arc...l#L96-L106

AZ2 info dialog has a fullscreen group that has poster, info and buttons (e.g. play, refresh etc.).
Pressing down scrolls to a separate fullscreen grouplist filled with widget lists.

Simplified, AZ2 info dialog looks like:
xml:

<control type="grouplist">
<include>FullScreenDimensions</include>

<!-- Main Page -->
<control type="group">
<include>FullScreenDimensions</include>
<!-- Info and Poster Here -->
<control type="grouplist" id="300">
<!-- Play Refresh etc. Buttons -->
</control>
</control>

<!-- Widgets Grouplist -->
<control type="grouplist">
<include>FullScreenDimensions</include>
<control type="list" id="5000">
</control>
<control type="list" id="5001">
</control>
<!-- More Lists Here -->
</control>
</control>

Simplified, my onclick actions are:
Code:

<onclick>SetFocus(5000)</onclick>
<onclick>SetFocus(300)</onclick>
<onclick>RunScript(...)</onclick>

So basically, I set focus to the first list in my grouplist of lists (id="5000"), then I set focus to my grouplist of control buttons (id="300"), then I run the script.

That way everything gets set back to initial positions before the next info dialog opens.


(2020-01-01, 14:33)nessus Wrote: I cant get these info. Which Container(ID) do you mean? I've set it to the hidden list container in custom tmdb info window but is not working while the others are working fine... eg $INFO[Container(999).ListItemAbsolute(0).Property(Born)]

EDIT: I just saw that if i set the id of the list container of eg info=stars_in_movies then the property is filled after the container is updated. Until then the property is empty. IMHO that's not proper behavior because you may want to see only the infos and not any of the lists.
Also is it possible to have total numitems.tmdb/numitems.dbid for movies or tv shows from both info=stars_in_movies and info=crew_in_movies ?
Only possible for individual lists.

Each plugin container is its own independent instance, which means it can only access its own info. Attempting cross talk between instances will create a race condition. Plus, even if I knew which container IDs the user wants to count, it isn't possible because Kodi creates the listitems *after* the plugin code is completed - so the code is finished before the info it needs is available.

This is where a scripted window like extended info has an advantage because it can pull in all the info that it needs at once and perform any needed data manipulation before creating any gui objects.

 
(2020-01-01, 14:33)nessus Wrote: Two more questions about this...
1. Why in arctic zephyr example don't you use the actual plugin path in the <content/> tags instead of these Info_Cast_Listxx variables?. Is there a downside if i use the actual plugin path?... plugin://plugin.video.themoviedb.helper?info=stars_in_movies&amp;type=person&amp;tmdb_id=$INFO[Container(999).ListItemAbsolute(0).Property(tmdb_id)]&amp;extended=True
No downside. If anything, your method is probably better.

My approach is a legacy from when I was using the window to show info for all types rather than just person (i.e. before I started calling the actual info dialog instead for movie/tv). Since either way works, I never bothered to change it.

(2020-01-01, 14:33)nessus Wrote: 2. When i am in the custom tmdb info window and clicking on an item (movie or tv show), the video info dialog opens properly but if i go back to custom tmdb info window, but, to go out also from there i need to click/back twice to close the window. The weird thing is that if i click on item (movie or tv show) and click again on an item (movie or tv show) in the opened video info dialog, then when i go back all the way to close all the windows it works fine and it needs only one click/back. Any idea?

Do you have this condition in the hidden list?
<onfocus condition="String.IsEmpty(Window(Home).Property(TMDbHelper.Path.Current))">Action(Back)</onfocus>

Also, because the person info isn't a dialog, you need an onback condition in your controls to replicate the del_path onunload condition:
<onback condition="!String.IsEmpty(Window(Home).Property(TMDbHelper.Path.Current))">RunScript(plugin.video.themoviedb.helper,del_path,call_id=1137)</onback>
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 - 2020-01-02, 00:07
Logout Mark Read Team Forum Stats Members Help
plugin.video.themoviedb.helper - Access to TheMovieDb API for Skinners2