Release plugin.video.themoviedb.helper - Access to TheMovieDb API for Skinners
(2020-01-03, 02:10)jurialmunkey Wrote: @nessus - Okay, I've managed to come up with what seems to be a far better way of handling the windows that simplifies the whole process quite a bit. Basically, when you run the script it will start a service monitor that manages the windows until you've finished browsing.

Custom Window
This window will form the base. It should be empty other than for a hidden list, a background, and a busy indicator. It can be any custom window ID. I've used 1190 here. The control list id must be 9999
xml:

<?xml version="1.0" encoding="UTF-8"?>
<window type="window" id="1190">
<defaultcontrol always="true">9999</defaultcontrol>
<controls>
<include>Global_Background</include>
<include>Topbar</include>
<control type="list" id="9999">
<top>-1000</top>
<left>-1000</left>
<width>1</width>
<height>1</height>
<itemlayout />
<focusedlayout />
<content target="videos">$INFO[Window(Home).Property(TMDbHelper.Path.Current)]</content>
</control>
<control type="group">
<visible>Container(9999).IsUpdating</visible>
<visible>!Window.IsVisible(DialogVideoInfo.xml)</visible>
<include>Dialog_Busy</include>
</control>
</controls>
</window>

DialogVideoInfo - List Onclick
Add the below onclick action to your info dialog widget lists. Do NOT close the dialog onclick. The script will handle closing the windows (you can set focus to another control, however). Make sure you remove any of the old onunload actions etc. -- This command will be the only one that you need!
xml:
<onclick>RunScript(plugin.video.themoviedb.helper,add_path=$INFO[ListItem.FolderPath],call_auto=1190)</onclick>

Using this call_auto method, the script will handle everything else.


Person Information
With the call_auto method, person information is shown directly in DialogVideoInfo.xml
Use the condition String.Contains(ListItem.FolderPath,type=person) to determine if the dialog is for a person. You can either modify specific pieces of information to suit, or include an entirely different layout - It's up to you.


There are still a couple of bugs here and there but overall it seems to be working. Occasionally there is a service instance left behind which results in odd behaviour (e.g. dialog will open and close twice) - I'm working on a way to clean-up these left overs once I figure out what the exact scenario is that causes it to occur.

@jurialmunkey, this is great, thanks! So if I understand correctly, now there is no need for the intermediate window that calls the window that used to have the person info, correct?

Now it is just the custom window and dialog video info.

Also, no need for the previous on back actions in the video info widget lists, correct?

Finally, I do not need to do any del_path or reset_path actions anywhere, correct?

When you have a chance, please confirm so I know how to modify my existing code. Thanks.

Regards,

Bart
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 bsoriano - 2020-01-03, 13:25
Logout Mark Read Team Forum Stats Members Help
plugin.video.themoviedb.helper - Access to TheMovieDb API for Skinners2