Images not displaying when using Includes with Params
#1
Hi Everybody,

I have the following include which displays some movie posters in the home screen. I am using parameters to create several widgets of different menus.

For some reason, the Movie images appear only if the panel is focused. Does this not get evaluated because of the Paramter, if not focused? :<texture>$VAR[HomeWidget$PARAM[MenuNr].Image]</texture>

I know that the variable works, because the image is displayed when focus. But have no idea why it does not display when not focused. Any hints??


xml:

<include name="WidgetBody">            
    <control type="group">
        <include>WidgetSlideAnimation</include>
        <visible>String.IsEqual(Container(100).ListItem.Property(SelectedMainMenu),MainMenu$PARAM[MenuNr]) + !String.IsEmpty(Skin.String(HomeWidget$PARAM[MenuNr].Type)) + ![Skin.HasSetting(showNowPlayingOnHome) + [Player.HasAudio | Player.HasVideo]]</visible>
        <control type="panel" id="$PARAM[MenuNr]003">
            <left>380</left>
            <top>290</top>
            <width>880</width>
            <orientation>vertical</orientation>
            <itemlayout width="220" height="320">
                <control type="image">
                    <width>215</width>
                    <height>315</height>
                    <texture>$VAR[HomeWidget$PARAM[MenuNr].Image]</texture>
                    <aspectratio>scale</aspectratio>
                    <bordersize>5</bordersize>
                    <bordertexture>tile.png</bordertexture>
                </control>
                <control type="label">
                        <label>[COLOR Accent]$VAR[HomeWidget$PARAM[MenuNr].Label][/COLOR]</label>
                        <height>30</height>
                        <width>200</width>
                        <font>Panel_Hint</font>
                        <align>left</align>
                        <shadowcolor>black</shadowcolor>
                </control>
            </itemlayout>
            <focusedlayout width="220" height="320">
                <control type="image">
                    <width>215</width>
                    <height>315</height>
                    <texture>$VAR[HomeWidget$PARAM[MenuNr].Image]</texture>
                    <aspectratio>scale</aspectratio>
                    <bordersize>5</bordersize>
                    <bordertexture>button.png</bordertexture>
                </control>
                <control type="label">
                        <label>[COLOR Accent]$VAR[HomeWidget$PARAM[MenuNr].Label][/COLOR]</label>
                        <height>30</height>
                        <width>200</width>
                        <font>Panel_Hint</font>
                        <align>left</align>
                        <shadowcolor>black</shadowcolor>
                </control>
            </focusedlayout>
            <include content="WidgetPosterAndThumbContent">
                <param name="WidgetNr" value="$PARAM[MenuNr]"/>
            </include>
        </control>
    </control>
</include>

Here also a snippet of the variable in question:

xml:

<variable name="HomeWidget1.Image">
    <value condition="Skin.String(HomeWidget1.Type,RandomMovies)">$INFO[ListItem.Art(poster)]</value>
    <value condition="Skin.String(HomeWidget1.Type,RandomTvShows)">$INFO[ListItem.Art(poster)]</value>
    <value>default.png</value>
</variable>
Reply
#2
Too early to fully understand your issue and my morning coffee is waiting for me, but I just noticed this:

<value condition="Skin.String(HomeWidget1.Type,RandomMovies)">$INFO[ListItem.Art(poster)]</value>

-->

<value condition="String.IsEqual(Skin.String(HomeWidget1.Type,RandomMovies))">$INFO[ListItem.Art(poster)]</value>
Main: Lancool II Mesh  - Ryzen 9 5900x - MSI x570 Unify - Zotac RTX 3080 AMP HOLO - 32GB Trident Z Neo 3600 CL16 -  EVO 960 M.2 250GB / EVO 940 250GB / MX100 512GB /  Crucial P1 2TB / WD Blue 3D Nand 2TB 
Sound: Saxx AS30 DSP - Beyer Dynamic Custom One Pro 
TV: Nvidia Shield 2019 Pro- Adalight 114x LEDs - Sony 65XG9505 - Kodi / Emby - Yamaha RX-V683 - Heco Victa 700/101/251a + Dynavoice Magic FX-4
Server: i3 Skylake - 8GB - OMV4 - 22TB Storage
Reply
#3
Hi Sualfred,

thanks for the hint.  You probably ment, but you were on the right track, it worked. Thanks a lot.

xml:

<value condition="String.IsEqual(Skin.String(HomeWidget1.Type),RandomTvShows)">$INFO[ListItem.Art(poster)]</value>


I actually have like 1000+ Variables using the original shown syntax, they all work fine, but it is definitely not the way to go, I will have some updating to do.
Reply
#4
As I said, too early. The missing morning coffee placed the ) wrong Wink
Main: Lancool II Mesh  - Ryzen 9 5900x - MSI x570 Unify - Zotac RTX 3080 AMP HOLO - 32GB Trident Z Neo 3600 CL16 -  EVO 960 M.2 250GB / EVO 940 250GB / MX100 512GB /  Crucial P1 2TB / WD Blue 3D Nand 2TB 
Sound: Saxx AS30 DSP - Beyer Dynamic Custom One Pro 
TV: Nvidia Shield 2019 Pro- Adalight 114x LEDs - Sony 65XG9505 - Kodi / Emby - Yamaha RX-V683 - Heco Victa 700/101/251a + Dynavoice Magic FX-4
Server: i3 Skylake - 8GB - OMV4 - 22TB Storage
Reply

Logout Mark Read Team Forum Stats Members Help
Images not displaying when using Includes with Params0