• 1
  • 7
  • 8
  • 9(current)
  • 10
  • 11
  • 85
Release plugin.video.themoviedb.helper - Access to TheMovieDb API for Skinners
@bsoriano - Should be added now. Anything with a &query= param, the plugin will check if a "/" separator is present and split the query at that point. Only the first item will be used.
Arctic Fuse - Alpha now available. Support me on Ko-fi.
Reply
(2019-08-21, 23:51)jurialmunkey Wrote: @bsoriano - Should be added now. Anything with a &query= param, the plugin will check if a "/" separator is present and split the query at that point. Only the first item will be used.
@jurialmunkey , thank you! I did some tests and it works.  

I am having an issue which is most likely unrelated.  I have mostly adapted successfully your code for Amber.  In the fake person info dialog, the issue I am having is that if I press back (hidden list 3100 is focused) nothing happens.  I need to press back a second time for the dialog to be closed.  I verified that the home window property tmdbhelper.path is not empty, so the dialog should close with the del_path call to the plugin.

I am not sure what part of the code should I post for you to take a look, if you would be so kind.  Here is what I have so far for the dialog:

xml:

<?xml version="1.0" encoding="UTF-8"?>
<window type="window" id="1128">
    <defaultcontrol always="true">9999</defaultcontrol>
    <controls>
    
        <control type="image">
            <width>1920</width>
            <height>1080</height>
            <texture>img/BlackDot.png</texture>
            <aspectratio>scale</aspectratio>
        </control>
        <control type="image">
            <width>1920</width>
            <height>1080</height>
            <texture background="true">special://skin/backgrounds/default.jpg</texture>
            <aspectratio>scale</aspectratio>
        </control>
        <include content="BackgroundOverlay">
            <param name="parentid" value="9999"/>
        </include>
    
        <!-- Wait until plugin has populated person info.  If it is not a person, just show info. -->
        <control type="list" id="9999">
            <onfocus condition="!Integer.IsEqual(Container(9999).NumItems,0) + !Container(9999).IsUpdating + !String.IsEmpty(Window(Home).Property(TMDbHelper.Path.Current)) + !String.Contains(Window(Home).Property(TMDbHelper.Path.Current),type=person)">Action(Info)</onfocus>
            <onfocus condition="!Integer.IsEqual(Container(9999).NumItems,0) + !Container(9999).IsUpdating + !String.IsEmpty(Window(Home).Property(TMDbHelper.Path.Current)) + String.Contains(Window(Home).Property(TMDbHelper.Path.Current),type=person)">SetFocus(3100)</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>

        <!-- Person Info -->
        <control type="group">
            <top>0</top>
            <left>0</left>
            <visible>String.Contains(Window(Home).Property(TMDbHelper.Path.Current),type=person) + !Control.HasFocus(9999)</visible>
                        
            <include content="ShadowedImage">
                <param name="top">24</param>
                <param name="left">24</param>
                <param name="width">619</param>
                <param name="height">960</param>
                <param name="shadowoffset">16</param>
                <param name="texture">$INFO[Container(9999).ListItemAbsolute(0).Art(poster)]</param>
                <param name="visibility">true</param>
            </include>
                        
            <control type="group" id="300">
                <posx>700</posx>
                <posy>60</posy>
                <control type="label" description="Person name">
                    <posy>-45</posy>
                    <width>950</width>
                    <height>60</height>
                    <font>InfoTitle</font>
                    <textcolor>Highlight</textcolor>
                    <align>left</align>
                    <label>$INFO[Container(9999).ListItemAbsolute(0).Label]</label>
                </control>
                <control type="image" description="Line Split">
                    <posy>23</posy>
                    <width>1180</width>
                    <height>1</height>
                    <texture>img/LineL.png</texture>
                    <aspectratio>stretch</aspectratio>
                </control>
                <control type="image" description="Line Split">
                    <posy>83</posy>
                    <width>1180</width>
                    <height>1</height>
                    <texture>img/LineL.png</texture>
                    <aspectratio>stretch</aspectratio>
                </control>                
                <control type="textbox" id="900031" description="Biography">
                    <include>VisibleFadeEffectDelay</include>
                    <posy>90</posy>
                    <left>5</left>
                    <width>620</width>
                    <height>355</height>
                    <align>justify</align>
                    <font>InfoPlot</font>
                    <textcolor>$VAR[InfoPlotTextColor]</textcolor>
                    <shadowcolor>LiteShadow</shadowcolor>
                    <label>$INFO[Container(9999).ListItemAbsolute(0).Property(biography)]</label>
                </control>
                <control type="radiobutton" id="90003">
                    <posy>447</posy>
                    <left>588.3</left>
                    <ondown>9100</ondown>
                    <onright>9009</onright>
                    <align>center</align>
                    <aligny>center</aligny>
                    <textureradioonfocus colordiffuse="Black">icons/dots7.png</textureradioonfocus>
                    <textureradioonnofocus>icons/dots7.png</textureradioonnofocus>
                    <texturefocus border="4" colordiffuse="Highlight">img/WhiteRoundedST2.png</texturefocus>
                    <texturenofocus border="4">img/WhiteRoundedT.png</texturenofocus>
                    <width>37</width>
                    <height>17</height>
                    <radiowidth>37</radiowidth>
                    <radioheight>37</radioheight>
                    <radioposx>0.1</radioposx>
                    <radioposy>0</radioposy>
                    <font></font>
                    <selected>true</selected>
                    <onclick>SetProperty(TextViewerHeader,$ESCINFO[Container(9999).ListItemAbsolute(0).Label],Home)</onclick>
                    <onclick>SetProperty(TextViewerContent,$ESCINFO[Container(9999).ListItemAbsolute(0).Property(biography)],Home)</onclick>
                    <onclick>ActivateWindow(1124)</onclick>
                </control>
                <control type="image" description="Line Split">
                    <posy>90</posy>
                    <left>637</left>
                    <width>1</width>
                    <height>375</height>
                    <texture>img/LineL.png</texture>
                    <aspectratio>stretch</aspectratio>
                </control>                
                <control type="panel" id="9009">
                    <include>VisibleFadeEffectDelay</include>
                    <include>List_9009_Commons</include>
                    <onup>9009</onup>
                    <ondown>9009</ondown>
                    <onleft>90003</onleft>
                    <content>
                        <item>
                            <label>$LOCALIZE[32082]:</label>
                            <label2>$INFO[Container(9999).ListItemAbsolute(0).Property(Birthday)]</label2>
                            <onclick>noop</onclick>
                            <visible>!String.IsEmpty(Container(9999).ListItemAbsolute(0).Property(Birthday))</visible>
                        </item>
                        <item>
                            <label>$LOCALIZE[32083]:</label>
                            <label2>$INFO[Container(9999).ListItemAbsolute(0).Property(Born)]</label2>
                            <onclick>noop</onclick>
                            <visible>!String.IsEmpty(Container(9999).ListItemAbsolute(0).Property(Born))</visible>
                        </item>
                        <item>
                            <label>$LOCALIZE[32084]:</label>
                            <label2>$INFO[Container(9999).ListItemAbsolute(0).Property(Age)]</label2>
                            <onclick>noop</onclick>
                            <visible>!String.IsEmpty(Container(9999).ListItemAbsolute(0).Property(Age))</visible>
                        </item>
                        <item>
                            <label>$LOCALIZE[32085]:</label>
                            <label2>$INFO[Container(9999).ListItemAbsolute(0).Property(Deathday)]</label2>
                            <onclick>noop</onclick>
                            <visible>!String.IsEmpty(Container(9999).ListItemAbsolute(0).Property(Deathday))</visible>
                        </item>
                        <item>
                            <label>$LOCALIZE[32085]:</label>
                            <label2>$INFO[Container(9999).ListItemAbsolute(0).Property(aliases)]</label2>
                            <onclick>noop</onclick>
                            <visible>!String.IsEmpty(Container(9999).ListItemAbsolute(0).Property(aliases))</visible>
                        </item>
                    </content>
                </control>
                
                <control type="button" id="3111">
                    <onfocus>SetFocus(3100)</onfocus>
                    <include>HiddenButton</include>
                </control>
                <control type="list" id="3100">
                    <orientation>horizontal</orientation>
                    <onup>90003</onup>
                    <ondown>9101</ondown>
                    <onback condition="!String.IsEmpty(Window(Home).Property(TMDbHelper.Path.Current))">RunScript(plugin.video.themoviedb.helper,del_path,call_id=1129)</onback>
                    <onback>3111</onback>
                    <itemlayout />
                    <focusedlayout />
                    <include>HiddenButton</include>
                    <content>$INFO[Window(Home).Property(TMDbHelper.Path.Current)]</content>
                </control>
                
            </control>
                
            <control type="group" id="9100">
                    
                <posx>700</posx>
                <posy>640</posy>
                <width>1180</width>
                <height>410</height>
                
                    <control type="list" id="9101">
                        <width>1180</width>
                        <height>410</height>
                        <onleft>9101</onleft>
                        <onright>9101</onright>
                        <scrolltime>200</scrolltime>
                        <orientation>horizontal</orientation>
                        <include>InfoList_OnBack</include>
                        <include content="InfoList_OnClick">
                            <param name="prevent_del" value="noop" />
                        </include>
                        <include content="SetLayout">
                            <param name="viewid">9101</param>
                        </include>
                        <content limit="25" target="videos">$VAR[InfoCastList01]</content>                        
                    </control>
            </control>
                
        </control>
    </controls>
</window>


My apologies for the long post.  Thank you for your help.

Regards,

Bart
Reply
@bsoriano - I can't see anything wrong there. Can you send me a link that I can install/test and steps to reproduce the issue? I'm wondering if it is a difference between systems rather than skin code.
Arctic Fuse - Alpha now available. Support me on Ko-fi.
Reply
(2019-08-23, 00:08)jurialmunkey Wrote: @bsoriano - I can't see anything wrong there. Can you send me a link that I can install/test and steps to reproduce the issue? I'm wondering if it is a difference between systems rather than skin code.
@jurialmunkey , thanks for looking into this.  My github repo has the code as far as I have it (https://github.com/bartolomesoriano/skin.amber).  Master and Leia branches are functionally identical.  The only machines I have to develop/test are all Windows 10 machines.  I am using Matrix nightly from August 15th.

To reproduce, go into the library, any movie, press i, and then press enter on any cast member.  You get the person info dialog, and then press back.  The first time, nothing happens.  if you press back a second time, then the dialog is closed.

Again, thanks for your help.

Regards,

Bart
Reply
@bsoriano

In DialogVideoInfo.xml get rid of the condition in your onunload action:
Change this:
xml:
<onunload condition="Window.IsVisible(1128)">RunScript(plugin.video.themoviedb.helper,del_path,call_id=1129)</onunload>
To this:
xml:
<onunload>RunScript(plugin.video.themoviedb.helper,del_path,call_id=1129)</onunload>

The condition isn't needed in my skin either (and I should probably remove it). It just doesn't affect AZ2 because for some reason my custom window is active before the onunload condition triggers. In Amber it is the reverse - the onunload triggers before the custom window becomes active.

I think it is because I have window close animations *inside* the <controls> section whereas you have them *outside* the <controls> section. So my onunload doesn't trigger until *after* my windowclose animation completes, whereas your onunload triggers at the same time your windowclose animation triggers.

When adding a path, the script force closes all dialogs (triggering window close animation) and then activates the window specified in the call_id. Because my window hasn't finished animating when the new window is called, then window becomes active *before* my onunload condition triggers and so the condition is true eventhough the window wasn't active when the dialog was asked to close.
Arctic Fuse - Alpha now available. Support me on Ko-fi.
Reply
BTW - on the note about animations, you can reduce the delay value in delay=0.35
All this does is add a delay before the script runs (i.e. it waits 350ms before running) - it is basically the same as using an AlarmClock but it can use values smaller than one second.
The only purpose of the delay is if you need to first set focus to a different control and need to wait for some animations to complete before triggering the new window.
Arctic Fuse - Alpha now available. Support me on Ko-fi.
Reply
(2019-08-23, 13:08)jurialmunkey Wrote: @bsoriano

In DialogVideoInfo.xml get rid of the condition in your onunload action:
Change this:
xml:
<onunload condition="Window.IsVisible(1128)">RunScript(plugin.video.themoviedb.helper,del_path,call_id=1129)</onunload>
To this:
xml:
<onunload>RunScript(plugin.video.themoviedb.helper,del_path,call_id=1129)</onunload>

The condition isn't needed in my skin either (and I should probably remove it). It just doesn't affect AZ2 because for some reason my custom window is active before the onunload condition triggers. In Amber it is the reverse - the onunload triggers before the custom window becomes active.

I think it is because I have window close animations *inside* the <controls> section whereas you have them *outside* the <controls> section. So my onunload doesn't trigger until *after* my windowclose animation completes, whereas your onunload triggers at the same time your windowclose animation triggers.

When adding a path, the script force closes all dialogs (triggering window close animation) and then activates the window specified in the call_id. Because my window hasn't finished animating when the new window is called, then window becomes active *before* my onunload condition triggers and so the condition is true eventhough the window wasn't active when the dialog was asked to close.
@jurialmunkey , thank you so much! There is no way I would have figured that out.  There is so much for me to learn about animations and the design part of skinning in general.  Removing the condition from the unload works great.

Regards,

Bart
Reply
(2019-08-23, 13:21)jurialmunkey Wrote: BTW - on the note about animations, you can reduce the delay value in delay=0.35
All this does is add a delay before the script runs (i.e. it waits 350ms before running) - it is basically the same as using an AlarmClock but it can use values smaller than one second.
The only purpose of the delay is if you need to first set focus to a different control and need to wait for some animations to complete before triggering the new window.

@jurialmunkey , thanks! For now I will just remove the delay and see how it goes.

Regards,

Bart
Reply
@jurialmunkey, one other question that I have not figured out a good answer for.  In you implementation, hidden list 3100 has the details for the person, and an onback from it closes the dialog and goes back to the previous path.  Is it necessary to keep the details in that list if they already are in container 9999?  

The reason I ask is that I would like a different, visible control to have the focus when the person dialog opens.  in my case, the button that opens a textviewer to show the biography.  Would I add the onback with the del_path call to this control then?

Regards,

Bart

EDIT: I tested and it seems to work.  Are there any disadvantages to using the info from container 9999 instead of 3100?
Reply
@jurialmunkey , I know this is not an issue with the plugin per se, but I understand you probably can figure out how to work around it:

I am getting errors in the log related to simplecache when movies and or people have accented characters in the name.  The following is an excerpt from my log when looking at person info for Ingrid García-Johnsson from the movie The Little Switzerland.

xml:

2019-08-23 12:18:50.567 T:18446744073709551614  NOTICE: [plugin.video.themoviedb.helper]
                                            Requesting... https://api.themoviedb.org/3/tv/popular?...ternal_ids
2019-08-23 12:18:50.749 T:18446744073709551614  NOTICE: script.grab.fanart: Grab Fanart Service Started
2019-08-23 12:18:52.887 T:18446744073709551614  NOTICE: script.tv.show.next.aired: ### TV Show - Next Aired starting GUI proc (6.0.15)
2019-08-23 12:18:54.378 T:18446744073709551614  NOTICE: [plugin.video.themoviedb.helper]
                                            Found TMDb ID 502416!
                                            info=find&type=movie&imdb_id=tt7958736
2019-08-23 12:18:59.365 T:18446744073709551614 WARNING: Invalid media type "actor"
2019-08-23 12:19:17.486 T:18446744073709551614 WARNING: Previous line repeats 5 times.
2019-08-23 12:19:17.486 T:18446744073709551614  NOTICE: script.tv.show.next.aired: ### TV Show - Next Aired starting GUI proc (6.0.15)
2019-08-23 12:19:21.245 T:18446744073709551614  NOTICE: Previous line repeats 1 times.
2019-08-23 12:19:21.245 T:18446744073709551614   ERROR: CImageLoader:Big GrinoWork - Direct texture file loading failed for resource://resource.images.studios.coloured/Mogambo.png
2019-08-23 12:19:21.588 T:18446744073709551614  NOTICE: [plugin.video.themoviedb.helper]
                                            Found TMDb ID 574374!
                                            info=find&type=movie&imdb_id=tt9100028
2019-08-23 12:19:29.384 T:18446744073709551614 WARNING: Skin Helper Simplecache --> _database ERROR ! -- You must not use 8-bit bytestrings unless you use a text_factory that can interpret 8-bit bytestrings (like text_factory = str). It is highly recommended that you instead just switch your application to Unicode strings.
2019-08-23 12:19:29.385 T:18446744073709551614 WARNING: Previous line repeats 1 times.
2019-08-23 12:19:29.385 T:18446744073709551614  NOTICE: [plugin.video.themoviedb.helper]
                                            Requesting... https://api.themoviedb.org/3/search/pers...ery=Ingrid García-Jonsson
2019-08-23 12:19:29.976 T:18446744073709551614 WARNING: Skin Helper Simplecache --> _database ERROR ! -- You must not use 8-bit bytestrings unless you use a text_factory that can interpret 8-bit bytestrings (like text_factory = str). It is highly recommended that you instead just switch your application to Unicode strings.
2019-08-23 12:19:29.978 T:18446744073709551614 WARNING: Previous line repeats 2 times.
2019-08-23 12:19:29.978 T:18446744073709551614  NOTICE: [plugin.video.themoviedb.helper]
                                            Requesting... https://api.themoviedb.org/3/person/1223...ery=Ingrid García-Jonsson&append_to_response=credits,images,release_dates,content_ratings,external_ids
2019-08-23 12:19:30.270 T:18446744073709551614 WARNING: Skin Helper Simplecache --> _database ERROR ! -- You must not use 8-bit bytestrings unless you use a text_factory that can interpret 8-bit bytestrings (like text_factory = str). It is highly recommended that you instead just switch your application to Unicode strings.
2019-08-23 12:19:30.272 T:18446744073709551614 WARNING: Invalid media type "actor"
2019-08-23 12:20:17.255 T:18446744073709551614 WARNING: Previous line repeats 5 times.

Is this something you can change from your end?

Regards,

Bart
Reply
(2019-08-23, 16:08)bsoriano Wrote: @jurialmunkey , thank you so much! There is no way I would have figured that out.  There is so much for me to learn about animations and the design part of skinning in general.  Removing the condition from the unload works great.
Honestly, I didn't know that about that difference with windowclose animations myself. I was fairly stumped for quite a while as I could see our approaches were functionally equivalent but for some reason Amber wasn't deleting the lock the first time around. It was a process of elimination through knowing exactly how my script works.

(2019-08-23, 17:35)bsoriano Wrote: In you implementation, hidden list 3100 has the details for the person, and an onback from it closes the dialog and goes back to the previous path. Is it necessary to keep the details in that list if they already are in container 9999? I tested and it seems to work. Are there any disadvantages to using the info from container 9999 instead of 3100?
I only use the 3100 list because I limit 9999 to one item to ensure that I'm always getting the first result for dialogvideoinfo. So I need 3100 to get the folder paths for the lists of movies/tvshows that the person was cast/crew in as these are further items in the detailed item list (e.g. Container(3100).ListItemAbsolute(2).FolderPath). Really I could use the direct plugin paths instead - it is just a little simpler to skin it my way because the listitem.folderpath is pre-filled with the correct tmdb_id and other params.

(2019-08-23, 18:24)bsoriano Wrote: I am getting errors in the log related to simplecache when movies and or people have accented characters in the name. The following is an excerpt from my log when looking at person info for Ingrid García-Johnsson from the movie The Little Switzerland.
There were some recent changes made to simplecache to ensure python 3 compatibility. I need to make some changes to the way I manage strings.

Also, I'm not sure why Kodi is complaining that "actor" is not a valid mediatype. It seems that maybe the available dbtypes for a plugin are a bit more limited than what the kodi library has.
Arctic Fuse - Alpha now available. Support me on Ko-fi.
Reply
(2019-08-24, 01:17)jurialmunkey Wrote:
(2019-08-23, 16:08)bsoriano Wrote: @jurialmunkey , thank you so much! There is no way I would have figured that out.  There is so much for me to learn about animations and the design part of skinning in general.  Removing the condition from the unload works great.
Honestly, I didn't know that about that difference with windowclose animations myself. I was fairly stumped for quite a while as I could see our approaches were functionally equivalent but for some reason Amber wasn't deleting the lock the first time around. It was a process of elimination through knowing exactly how my script works.
(2019-08-23, 17:35)bsoriano Wrote: In you implementation, hidden list 3100 has the details for the person, and an onback from it closes the dialog and goes back to the previous path. Is it necessary to keep the details in that list if they already are in container 9999? I tested and it seems to work. Are there any disadvantages to using the info from container 9999 instead of 3100?
I only use the 3100 list because I limit 9999 to one item to ensure that I'm always getting the first result for dialogvideoinfo. So I need 3100 to get the folder paths for the lists of movies/tvshows that the person was cast/crew in as these are further items in the detailed item list (e.g. Container(3100).ListItemAbsolute(2).FolderPath). Really I could use the direct plugin paths instead - it is just a little simpler to skin it my way because the listitem.folderpath is pre-filled with the correct tmdb_id and other params.
(2019-08-23, 18:24)bsoriano Wrote: I am getting errors in the log related to simplecache when movies and or people have accented characters in the name. The following is an excerpt from my log when looking at person info for Ingrid García-Johnsson from the movie The Little Switzerland.
There were some recent changes made to simplecache to ensure python 3 compatibility. I need to make some changes to the way I manage strings.

Also, I'm not sure why Kodi is complaining that "actor" is not a valid mediatype. It seems that maybe the available dbtypes for a plugin are a bit more limited than what the kodi library has. 
@jurialmunkey , thank you for the explanations! For now I removed the limit from container 9999 in Amber and I am using the folderpaths from it for the different cast lists.  I also made my "..." button the default in the person info dialog.  So far so good.

I added three other cast lists (cast in tv shows, and crew in movies and tv shows) to the person info dialog, but I have not been able to figure out how to not show any that is empty.  If I add Integer.IsGreater(Container(xxx).NumItems,0) | Container(xxx).IsUpdating  as the visibility condition to any of the lists, the list does not show, even if it has items.  I ran into this before with my custom search window and could not figure it out there either.

My code for the lists is this right now (with a workaround to show that a list is empty):
xml:

<control type="group" id="9100">
                <posx>700</posx>
                <posy>600</posy>
                <width>1180</width>
                <height>450</height>
                
                <control type="grouplist" id="91001">
                    <scrolltime tween="quadratic">400</scrolltime>
                    <onup>90003</onup>
                    <height>450</height>
                    <orientation>vertical</orientation>
                    <itemgap>50</itemgap>
                    <usecontrolcoords>true</usecontrolcoords>
                    
                    <control type="group">
                        <height>450</height>
                        <control type="group">
                            <control type="label">
                                <left>8</left>
                                <top>0</top>
                                <height>30</height>
                                <label>Cast in Movies</label>
                            </control>
                            <control type="image" description="Line Split">
                                <top>38</top>
                                <left>10</left>
                                <width>1180</width>
                                <height>1</height>
                                <texture>img/LineL.png</texture>
                                <aspectratio>stretch</aspectratio>
                            </control>
                            <control type="list" id="9101">
                                <top>42</top>
                                <width>1180</width>
                                <height>410</height>
                                <onup>300</onup>
                                <ondown>9102</ondown>
                                <onleft>9101</onleft>
                                <onright>9101</onright>
                                <scrolltime>200</scrolltime>
                                <orientation>horizontal</orientation>
                                <include>InfoList_OnBack</include>
                                <include content="InfoList_OnClick">
                                    <param name="prevent_del" value="noop" />
                                </include>
                                <include content="CastLayout">
                                    <param name="viewid">9101</param>
                                    <param name="belowdoublelabel1">$INFO[ListItem.Label] $INFO[ListItem.Year,(,)]</param>
                                    <param name="belowdoublelabel2">$INFO[ListItem.Property(character)]</param>
                                </include>
                                <content>
                                    <item>
                                        <icon>DefaultAddonNone.png</icon>
                                        <thumb>DefaultAddonNone.png</thumb>
                                        <visible>String.IsEmpty(Container(9101).ListItem(1).Label)</visible>
                                    </item>
                                </content>
                                <content sortby="year" sortorder="descending" limit="25" target="videos">$VAR[InfoCastList01]</content>                        
                            </control>
                        </control>
                    </control>
                    
                    <control type="group">
                        <height>450</height>
                        <control type="group">
                            <control type="label">
                                <left>8</left>
                                <top>0</top>
                                <height>30</height>
                                <label>Cast in TV Shows</label>
                            </control>
                            <control type="image" description="Line Split">
                                <top>38</top>
                                <left>10</left>
                                <width>1180</width>
                                <height>1</height>
                                <texture>img/LineL.png</texture>
                                <aspectratio>stretch</aspectratio>
                            </control>
                            <control type="list" id="9102">
                                <top>42</top>
                                <width>1180</width>
                                <height>410</height>
                                <onup>9101</onup>
                                <ondown>9103</ondown>
                                <onleft>9102</onleft>
                                <onright>9102</onright>
                                <scrolltime>200</scrolltime>
                                <orientation>horizontal</orientation>
                                <include>InfoList_OnBack</include>
                                <include content="InfoList_OnClick">
                                    <param name="prevent_del" value="noop" />
                                </include>
                                <include content="CastLayout">
                                    <param name="viewid">9102</param>
                                    <param name="belowdoublelabel1">$INFO[ListItem.Label] $INFO[ListItem.Year,(,)]</param>
                                    <param name="belowdoublelabel2">$INFO[ListItem.Property(character)]</param>
                                </include>
                                <content>
                                    <item>
                                        <icon>DefaultAddonNone.png</icon>
                                        <thumb>DefaultAddonNone.png</thumb>
                                        <visible>String.IsEmpty(Container(9102).ListItem(1).Label)</visible>
                                    </item>
                                </content>
                                <content sortby="year" sortorder="descending" limit="25" target="videos">$VAR[InfoCastList02]</content>                        
                            </control>
                        </control>
                    </control>

                    <control type="group">
                        <height>450</height>
                        <control type="group">
                            <control type="label">
                                <left>8</left>
                                <top>0</top>
                                <height>30</height>
                                <label>Crew in Movies</label>
                            </control>
                            <control type="image" description="Line Split">
                                <top>38</top>
                                <left>10</left>
                                <width>1180</width>
                                <height>1</height>
                                <texture>img/LineL.png</texture>
                                <aspectratio>stretch</aspectratio>
                            </control>
                            <control type="list" id="9103">
                                <top>42</top>
                                <width>1180</width>
                                <height>410</height>
                                <onup>9102</onup>
                                <ondown condition="Integer.IsGreater(Container(9104).NumItems,0)">9104</ondown>
                                <onleft>9103</onleft>
                                <onright>9103</onright>
                                <scrolltime>200</scrolltime>
                                <orientation>horizontal</orientation>
                                <include>InfoList_OnBack</include>
                                <include content="InfoList_OnClick">
                                    <param name="prevent_del" value="noop" />
                                </include>
                                <include content="CastLayout">
                                    <param name="viewid">9103</param>
                                    <param name="belowdoublelabel1">$INFO[ListItem.Label] $INFO[ListItem.Year,(,)]</param>
                                    <param name="belowdoublelabel2">$INFO[ListItem.Property(job)]</param>
                                </include>
                                <content>
                                    <item>
                                        <icon>DefaultAddonNone.png</icon>
                                        <thumb>DefaultAddonNone.png</thumb>
                                        <visible>String.IsEmpty(Container(9103).ListItem(1).Label)</visible>
                                    </item>
                                </content>
                                <content sortby="year" sortorder="descending" limit="25" target="videos">$VAR[InfoCastList03]</content>                        
                            </control>
                        </control>
                    </control>
                    
                   <control type="group">
                        <height>450</height>
                        <control type="group">
                            <control type="label">
                                <left>8</left>
                                <top>0</top>
                                <height>30</height>
                                <label>Crew in TV Shows</label>
                            </control>
                            <control type="image" description="Line Split">
                                <top>38</top>
                                <left>10</left>
                                <width>1180</width>
                                <height>1</height>
                                <texture>img/LineL.png</texture>
                                <aspectratio>stretch</aspectratio>
                            </control>
                            <control type="list" id="9104">
                                <top>42</top>
                                <width>1180</width>
                                <height>410</height>
                                <onup>9103</onup>
                                <onleft>9104</onleft>
                                <onright>9104</onright>
                                <scrolltime>200</scrolltime>
                                <orientation>horizontal</orientation>
                                <include>InfoList_OnBack</include>
                                <include content="InfoList_OnClick">
                                    <param name="prevent_del" value="noop" />
                                </include>
                                <include content="CastLayout">
                                    <param name="viewid">9104</param>
                                    <param name="belowdoublelabel1">$INFO[ListItem.Label] $INFO[ListItem.Year,(,)]</param>
                                    <param name="belowdoublelabel2">$INFO[ListItem.Property(job)]</param>
                                </include>
                                <content>
                                    <item>
                                        <icon>DefaultAddonNone.png</icon>
                                        <thumb>DefaultAddonNone.png</thumb>
                                        <visible>String.IsEmpty(Container(9104).ListItem(1).Label)</visible>
                                    </item>
                                </content>
                                <content sortby="year" sortorder="descending" limit="25" target="videos">$VAR[InfoCastList04]</content>                        
                            </control>
                        </control>
                    </control>
                    
                </control>   
            </control>

Is there a trick to making the visibility conditions work and only show the lists that have content? I know I have asked way too many questions already, so I understand if you don't have the time or inclination to look at this.

I do have a feature request: Could you please add properties to indicate for a person how many total movies and total tv shows were found in tmdb, and also how many are in the local database? This is something that Extendedinfo had that I am missing.  Thanks for considering this request.

Regards,

Bart
Reply
(2019-08-24, 01:59)bsoriano Wrote: Is there a trick to making the visibility conditions work and only show the lists that have content? I know I have asked way too many questions already, so I understand if you don't have the time or inclination to look at this.
Totally fine! It also helps me improve the plugin by seeing how skinners are using it.

I ran into this problem too. It's because there isn't a plugin path when the window first loads. Since it has no items and isn't updating, then it is hidden and so the content path never updates. I still use the same visible conditions checking isupdating and numitems, but I also use a variable content path in my additional lists to provide items while I wait for my detailed item container to load:

xml:

<variable name="Info_Cast_List01">
<value condition="!Container(3100).IsUpdating + Integer.IsGreater(Container(3100).NumItems,0)">$INFO[Container(3100).ListItemAbsolute(1).FolderPath]</value>
<value>videodb://</value>
</variable>

I show videodb:// while my detailed item is loading because I know that path will always have items and it loads quickly. You don't see the list because my whole fake info dialog group is also hidden until the detailed item loads. I also use a conditional fade animation on the additional list to hide it whilst it is updating and show a busy spinner instead.

(2019-08-24, 01:59)bsoriano Wrote: I do have a feature request: Could you please add properties to indicate for a person how many total movies and total tv shows were found in tmdb, and also how many are in the local database? This is something that Extendedinfo had that I am missing.  Thanks for considering this request.
Try latest version.
To your plugin path add
Code:
&amp;prop_id=Foobar

This will create window properties:
Window(Home).Property(TMDBHelper.Foobar.NumDBIDItems)
Window(Home).Property(TMDBHelper.Foobar.NumTMDBItems)

You can use any name in-place of "Foobar".


---

Also, as an aside, I remember why I had the onunload condition in DialogVideoInfo. Otherwise it launches the custom window every time you leave dialogvideoinfo, but we only want that to happen if we have a path, so change it to:
Code:
<onunload condition="!String.IsEmpty(Window(Home).Property(TMDbHelper.Path.Current))">RunScript(plugin.video.themoviedb.helper,del_path,call_id=1129)</onunload>
Arctic Fuse - Alpha now available. Support me on Ko-fi.
Reply
(2019-08-24, 03:40)jurialmunkey Wrote:
(2019-08-24, 01:59)bsoriano Wrote: Is there a trick to making the visibility conditions work and only show the lists that have content? I know I have asked way too many questions already, so I understand if you don't have the time or inclination to look at this.
Totally fine! It also helps me improve the plugin by seeing how skinners are using it.

I ran into this problem too. It's because there isn't a plugin path when the window first loads. Since it has no items and isn't updating, then it is hidden and so the content path never updates. I still use the same visible conditions checking isupdating and numitems, but I also use a variable content path in my additional lists to provide items while I wait for my detailed item container to load:

xml:

<variable name="Info_Cast_List01">
<value condition="!Container(3100).IsUpdating + Integer.IsGreater(Container(3100).NumItems,0)">$INFO[Container(3100).ListItemAbsolute(1).FolderPath]</value>
<value>videodb://</value>
</variable>

I show videodb:// while my detailed item is loading because I know that path will always have items and it loads quickly. You don't see the list because my whole fake info dialog group is also hidden until the detailed item loads. I also use a conditional fade animation on the additional list to hide it whilst it is updating and show a busy spinner instead.
(2019-08-24, 01:59)bsoriano Wrote: I do have a feature request: Could you please add properties to indicate for a person how many total movies and total tv shows were found in tmdb, and also how many are in the local database? This is something that Extendedinfo had that I am missing.  Thanks for considering this request.
Try latest version.
To your plugin path add
Code:
&amp;prop_id=Foobar

This will create window properties:
Window(Home).Property(TMDBHelper.Foobar.NumDBIDItems)
Window(Home).Property(TMDBHelper.Foobar.NumTMDBItems)

You can use any name in-place of "Foobar".


---

Also, as an aside, I remember why I had the onunload condition in DialogVideoInfo. Otherwise it launches the custom window every time you leave dialogvideoinfo, but we only want that to happen if we have a path, so change it to:
Code:
<onunload condition="!String.IsEmpty(Window(Home).Property(TMDbHelper.Path.Current))">RunScript(plugin.video.themoviedb.helper,del_path,call_id=1129)</onunload>
 
@jurialmunkey , thanks for your continued help!

Unfortunately, I could not get it to work yet.  I added the visibility conditions, the fade animation and the additional value in the cast list variables.  What happens is that if any cast info list is empty, it will not show, but it also will not show the previous one. 

The way I want to have the person info dialog is that I want to show one cast info list at a time, and scroll down for the next one to take the place of the previous one.  Ideally, if there are any cast info lists empty, they just won't show, and only the ones with items will show.  For example, if the person is a director, and has no cast in movies or cast in tv shows, then crew in movies should be the first list to show up.

Any clues as to how I could achieve this?  The master branch of my GitHub has my latest code, with the visibility conditions and additional value in the variables commented out.  Thank you so much for your help, it certainly feels like I have a very long road ahead of me with skinning!


Thanks for the additional window props.  They do not seem to be working fine. NumTMDBItems always is 1, and NumDBIDItems is always 0.

Bart
Reply
(2019-08-24, 16:51)bsoriano Wrote: Unfortunately, I could not get it to work yet.  I added the visibility conditions, the fade animation and the additional value in the cast list variables.  What happens is that if any cast info list is empty, it will not show, but it also will not show the previous one. 

Works fine for me when I uncomment out the lines in DialogVideoInfo and the variables.
All I had to do was move your Control.IsVisible(9101) visibility conditions to the parent group.
This PR works for me:
https://github.com/bartolomesoriano/skin.amber/pull/6

(2019-08-24, 16:51)bsoriano Wrote: Thanks for the additional window props.  They do not seem to be working fine. NumTMDBItems always is 1, and NumDBIDItems is always 0.
I can't see anywhere that you've actually added the additional param to the path?
Also, it shouldn't be possible for NumDBIDItems to be 0 as I don't add the property if the value is not > 0
Arctic Fuse - Alpha now available. Support me on Ko-fi.
Reply
  • 1
  • 7
  • 8
  • 9(current)
  • 10
  • 11
  • 85

Logout Mark Read Team Forum Stats Members Help
plugin.video.themoviedb.helper - Access to TheMovieDb API for Skinners2