Release plugin.video.themoviedb.helper - Access to TheMovieDb API for Skinners
(2019-12-21, 13:27)nessus Wrote: The only info that are missing now are the media flags, eg ListItem.VideoResolution for the local items.
...
What about this one?
Would only be available if I merged local info with online info, which I'm avoiding. If it is something that is desperately needed, I could add a param to merge with local info but it will add additional overhead.

(2019-12-21, 19:51)nessus Wrote: That's fine. I am already closing the info dialog when an item is playable. IMHO this is proper behavior and makes it clear to the user that it opens the info dialog for a different item. If you don't want to add this then we will need a click action to run the script and show the video info for that clicked item.

It isn't possible to open an info dialog from the info dialog because Action(Info) closes the dialog and once the dialog is closed the item no longer exists to open an info dialog for.

If you're trying to have an ExtendedInfo type experience, then you have two options:
  1. Use the custom window implementation for TMDbHelper as done in AZ2
  2. Use Sualfred's extended info replacement "script.embuary.info" - https://forum.kodi.tv/showthread.php?tid=346034

The TMDbHelper implementation is as follows:

Onclick Action for Video Info Dialog Lists
Code:
<onclick condition="String.IsEmpty(ListItem.DBID) + !String.IsEmpty(ListItem.Property(tmdb_id))">RunScript(plugin.video.themoviedb.helper,add_path=$INFO[ListItem.FolderPath],call_id=1137,prevent_del)</onclick>
This action adds the item's path to $INFO[Window(Home).Property(TMDbHelper.Path.Current)] and then calls ActivateWindow(1137). You can change the call_id to any custom window ID that you wish to use.

Window 1137
xml:

<?xml version="1.0" encoding="UTF-8"?>
<window type="window" id="1137">
<defaultcontrol always="true">9999</defaultcontrol>
<controls>
<control type="button" id="9999">
<onfocus>ReplaceWindow(1136)</onfocus>
</control>
</controls>
</window>
All this window does is call window ID 1136 (again you can use any custom window ID, these are just the ones used in AZ2). It's basically a trick to force 1136 to update.

Window 1136
This window has a hidden list with TMDbHelper.Path.Current (which is the detailed item path we added). It sits in a focus loop until the item loads and then calls Action(Info) to open the info dialog
xml:

<?xml version="1.0" encoding="UTF-8"?>
<window type="window" id="1136">
<defaultcontrol always="true">9999</defaultcontrol>
<controls>
<control type="list" id="9999">
<width>1</width>
<height>1</height>
<left>-1000</left>
<top>-1000</top>
<onfocus condition="!Integer.IsEqual(Container(9999).NumItems,0) + !Container(9999).IsUpdating + !String.IsEmpty(Window(Home).Property(TMDbHelper.Path.Current))">Action(Info)</onfocus>
<onfocus condition="[Integer.IsEqual(Container(9999).NumItems,0) | Container(9999).IsUpdating] + !String.IsEmpty(Window(Home).Property(TMDbHelper.Path.Current))">AlarmClock(doinfo,SetFocus(9999),00:01,silent)</onfocus>
<onfocus condition="String.IsEmpty(Window(Home).Property(TMDbHelper.Path.Current))">Action(Back)</onfocus>
<itemlayout />
<focusedlayout />
<content limit="1" target="videos">$INFO[Window(Home).Property(TMDbHelper.Path.Current)]</content>
</control>
</controls>
</window>

DialogVideoInfo
Finally, in DialogVideoInfo you need an onunload condition to clear the path on back:
Code:
<onunload condition="!String.IsEmpty(Window(Home).Property(TMDbHelper.Path.Current))">RunScript(plugin.video.themoviedb.helper,del_path,call_id=1137)</onunload>


This method will keep a history of the paths used. Look at AZ2 for some advanced tricks that I do to add actor info page (https://github.com/jurialmunkey/skin.arc...B_Info.xml) and also add paths for local items into the history by using some additional onclick actions and url encoded library nodes (https://github.com/jurialmunkey/skin.arc...l#L96-L106) - though these are both advanced features that aren't necessary. The above implementation will work to replace extended info.
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-12-22, 01:32
Logout Mark Read Team Forum Stats Members Help
plugin.video.themoviedb.helper - Access to TheMovieDb API for Skinners2