Skip to content

Replacing Extended Info

jurialmunkey edited this page Jun 24, 2023 · 11 revisions

Using TMDbHelper to Replace ExtendedInfo Script

TMDbHelper provides a simple window manager to act as an Extended Info replacement.

The basic implementation is as follows:

Custom Window 1190

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 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>

Onclick Action for TMDbHelper Lists to Open Info for Item

<onclick>RunScript(plugin.video.themoviedb.helper,add_path=$INFO[ListItem.FolderPath],call_auto=1190)</onclick>

This action adds the item's path to $INFO[Window(Home).Property(TMDbHelper.Path.Current)] and then calls ActivateWindow(1190). You can change the call_auto to use any custom ID.

Onclick Action for Kodi Library Paths and Other Plugins to Open Info for Item

<onclick>RunScript(plugin.video.themoviedb.helper,add_query=$INFO[ListItem.Label],type=person,call_auto=1190)</onclick>

This action will look-up the correct detailed item for the query. If multiple items are found, it will present the user with a dialog box to select the correct one. The path that is found will be passed to the add_path method.

When using add_query, make sure to also specify either type=person type=movie type=tv

Person Info

The call_auto method calls the VideoInfo dialog for all types of content. Since this dialog usually doesn't have person information (and so most of the lists and infolabels won't be relevant), you will need to modify it. You can use the condition String.IsEqual(ListItem.Property(item.type),person) to check if the person info dialog is active.

Closing the Info Dialog

If you need to close the info dialog for any reason (e.g. to play a video) then use the following command to reset all the paths and close the window manager: <onclick>RunScript(plugin.video.themoviedb.helper,close_dialog=1190)</onclick>

Direct Call Auto

As of v5.1.13+ there is an additional setting Skin.SetBool(TMDbHelper.DirectCallAuto)

This setting will improve speed by generating the listitem and calling the info dialog directly rather than relying on the list in the custom window.

When using this method, you should remove the list ID "9999" from your custom window as it will not be used. Since there is no base window list, you will not have a background image. Instead add your background include directly to DialogVideoInfo.xml <include condition="Window.IsVisible(1190)">Background_Include</include>

The custom window will only be shown in-between dialogs loading.