Kodi Community Forum

Full Version: Perfect code doesn't work on KRYTPON
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
WARNING: THIS IS REALLY HEAVY ADVANCED CODE STUFF, NOTHING FOR .XML BEGINNERS!
This .xml problem driving me nuts since weeks...
Image
  • This Code works perfect on Leia!
  • But not on Krypton!
  • The small "script.embuary.helper" HelperScript code is fine also for Krypton! (I can prove it but I do not want to explain it for a long time now)
  • No InfoLabels, Boolean Conditions and Syntax, are Leia exclusive, all code is compatible with Krypton!
Dependency here is the EmbuaryHelper addon and the Actress PNG's resource addon


Who finds the mistake we richly rewarded!  Rofl
___
In includes.xml

xml:
<include name="DisplayCast">
                <control type="list" id="524">
                <visible>!ListItem.IsCollection + !Container.Content(seasons)</visible>
                    <itemlayout>
                    </itemlayout>
                    <focusedlayout>
                    </focusedlayout>
                    <content target="video">plugin://script.embuary.helper?info=getcast&amp;type=$INFO[ListItem.DBType]&amp;dbid=$INFO[ListItem.DBID]</content>
                </control>
    </include>
    <include name="DisplayPngCast">
                <control type="group">
                <visible>System.IdleTime(1) + !ListItem.IsCollection + !Container.Content(seasons)</visible>
                <control type="image" id="2440">
                    <include>HiddenObject</include>
                    <texture fallback="">$INFO[Container(524).ListItemAbsolute(0).Label,resource://resource.images.actorart/,.png]</texture>
                </control>
                <control type="image" id="2441">
                    <include>HiddenObject</include>
                    <texture fallback="">$INFO[Container(524).ListItemAbsolute(1).Label,resource://resource.images.actorart/,.png]</texture>
                </control>
                <control type="image" id="2442">
                    <include>HiddenObject</include>
                    <texture fallback="">$INFO[Container(524).ListItemAbsolute(2).Label,resource://resource.images.actorart/,.png]</texture>
                </control>
                <control type="image" id="2443">
                    <include>HiddenObject</include>
                    <texture fallback="">$INFO[Container(524).ListItemAbsolute(3).Label,resource://resource.images.actorart/,.png]</texture>
                </control>
                <control type="image" id="2444">
                    <include>HiddenObject</include>
                    <texture fallback="">$INFO[Container(524).ListItemAbsolute(4).Label,resource://resource.images.actorart/,.png]</texture>
                </control>
                <control type="image" id="2445">
                    <include>HiddenObject</include>
                    <texture fallback="">$INFO[Container(524).ListItemAbsolute(5).Label,resource://resource.images.actorart/,.png]</texture>
                </control>
                <control type="image" id="2446">
                    <include>HiddenObject</include>
                    <texture fallback="">$INFO[Container(524).ListItemAbsolute(6).Label,resource://resource.images.actorart/,.png]</texture>
                </control>
                <control type="image" id="2447">
                    <include>HiddenObject</include>
                    <texture fallback="">$INFO[Container(524).ListItemAbsolute(7).Label,resource://resource.images.actorart/,.png]</texture>
                </control>
                <control type="image" id="2448">
                    <include>HiddenObject</include>
                    <texture fallback="">$INFO[Container(524).ListItemAbsolute(8).Label,resource://resource.images.actorart/,.png]</texture>
                </control>
                <control type="image" id="2449">
                    <include>HiddenObject</include>
                    <texture fallback="">$INFO[Container(524).ListItemAbsolute(9).Label,resource://resource.images.actorart/,.png]</texture>
                </control>
                <control type="image" id="2450">
                    <include>HiddenObject</include>
                    <texture fallback="">$INFO[Container(524).ListItemAbsolute(10).Label,resource://resource.images.actorart/,.png]</texture>
                </control>
                <control type="image" id="2451">
                    <include>HiddenObject</include>
                    <texture fallback="">$INFO[Container(524).ListItemAbsolute(11).Label,resource://resource.images.actorart/,.png]</texture>
                </control>
                <control type="image" id="2452">
                    <include>HiddenObject</include>
                    <texture fallback="">$INFO[Container(524).ListItemAbsolute(12).Label,resource://resource.images.actorart/,.png]</texture>
                </control>
                <control type="image" id="2453">
                    <include>HiddenObject</include>
                    <texture fallback="">$INFO[Container(524).ListItemAbsolute(13).Label,resource://resource.images.actorart/,.png]</texture>
                </control>
                <control type="image" id="2454">
                    <include>HiddenObject</include>
                    <texture fallback="">$INFO[Container(524).ListItemAbsolute(14).Label,resource://resource.images.actorart/,.png]</texture>
                </control>
                <control type="image" id="2455">
                    <include>HiddenObject</include>
                    <texture fallback="">$INFO[Container(524).ListItemAbsolute(15).Label,resource://resource.images.actorart/,.png]</texture>
                </control>
                <control type="image" id="2456">
                    <include>HiddenObject</include>
                    <texture fallback="">$INFO[Container(524).ListItemAbsolute(16).Label,resource://resource.images.actorart/,.png]</texture>
                </control>
                <control type="image" id="2457">
                    <include>HiddenObject</include>
                    <texture fallback="">$INFO[Container(524).ListItemAbsolute(17).Label,resource://resource.images.actorart/,.png]</texture>
                </control>
                <control type="image" id="2458">
                    <include>HiddenObject</include>
                    <texture fallback="">$INFO[Container(524).ListItemAbsolute(18).Label,resource://resource.images.actorart/,.png]</texture>
                </control>
                <control type="image" id="2459">
                    <include>HiddenObject</include>
                    <texture fallback="">$INFO[Container(524).ListItemAbsolute(19).Label,resource://resource.images.actorart/,.png]</texture>
                </control>
                <control type="image" id="2460">
                    <include>HiddenObject</include>
                    <texture fallback="">$INFO[Container(524).ListItemAbsolute(20).Label,resource://resource.images.actorart/,.png]</texture>
                </control>
                <control type="image" id="2461">
                    <include>HiddenObject</include>
                    <texture fallback="">$INFO[Container(524).ListItemAbsolute(21).Label,resource://resource.images.actorart/,.png]</texture>
                </control>
                <control type="image" id="2462">
                    <include>HiddenObject</include>
                    <texture fallback="">$INFO[Container(524).ListItemAbsolute(22).Label,resource://resource.images.actorart/,.png]</texture>
                </control>
                <control type="image" id="2463">
                    <include>HiddenObject</include>
                    <texture fallback="">$INFO[Container(524).ListItemAbsolute(23).Label,resource://resource.images.actorart/,.png]</texture>
                </control>
                <control type="image" id="2464">
                    <include>HiddenObject</include>
                    <texture fallback="">$INFO[Container(524).ListItemAbsolute(24).Label,resource://resource.images.actorart/,.png]</texture>
                </control>
                <control type="list" id="534">
                    <scrolltime>4000</scrolltime>
                    <autoscroll>true</autoscroll>
                    <itemlayout>
                    </itemlayout>
                    <focusedlayout>
                    </focusedlayout>
                    <content>
                        <item>
                        <label>$INFO[Container(524).ListItemAbsolute(0).Label]</label>
                        <label2>$INFO[Container(524).ListItemAbsolute(0).Label,resource://resource.images.actorart/,.png]</label2>
                        <visible>!String.IsEmpty(Control.GetLabel(2440))</visible>
                        </item>
                        <item>
                        <label>$INFO[Container(524).ListItemAbsolute(1).Label]</label>
                        <label2>$INFO[Container(524).ListItemAbsolute(1).Label,resource://resource.images.actorart/,.png]</label2>
                        <visible>!String.IsEmpty(Control.GetLabel(2441))</visible>
                        </item>
                        <item>
                        <label>$INFO[Container(524).ListItemAbsolute(2).Label]</label>
                        <label2>$INFO[Container(524).ListItemAbsolute(2).Label,resource://resource.images.actorart/,.png]</label2>
                        <visible>!String.IsEmpty(Control.GetLabel(2442))</visible>
                        </item>
                        <item>
                        <label>$INFO[Container(524).ListItemAbsolute(3).Label]</label>
                        <label2>$INFO[Container(524).ListItemAbsolute(3).Label,resource://resource.images.actorart/,.png]</label2>
                        <visible>!String.IsEmpty(Control.GetLabel(2443))</visible>
                        </item>
                        <item>
                        <label>$INFO[Container(524).ListItemAbsolute(4).Label]</label>
                        <label2>$INFO[Container(524).ListItemAbsolute(4).Label,resource://resource.images.actorart/,.png]</label2>
                        <visible>!String.IsEmpty(Control.GetLabel(2444))</visible>
                        </item>
                        <item>
                        <label>$INFO[Container(524).ListItemAbsolute(5).Label]</label>
                        <label2>$INFO[Container(524).ListItemAbsolute(5).Label,resource://resource.images.actorart/,.png]</label2>
                        <visible>!String.IsEmpty(Control.GetLabel(2445))</visible>
                        </item>
                        <item>
                        <label>$INFO[Container(524).ListItemAbsolute(6).Label]</label>
                        <label2>$INFO[Container(524).ListItemAbsolute(6).Label,resource://resource.images.actorart/,.png]</label2>
                        <visible>!String.IsEmpty(Control.GetLabel(2446))</visible>
                        </item>
                        <item>
                        <label>$INFO[Container(524).ListItemAbsolute(7).Label]</label>
                        <label2>$INFO[Container(524).ListItemAbsolute(7).Label,resource://resource.images.actorart/,.png]</label2>
                        <visible>!String.IsEmpty(Control.GetLabel(2447))</visible>
                        </item>
                        <item>
                        <label>$INFO[Container(524).ListItemAbsolute(8).Label]</label>
                        <label2>$INFO[Container(524).ListItemAbsolute(8).Label,resource://resource.images.actorart/,.png]</label2>
                        <visible>!String.IsEmpty(Control.GetLabel(2448))</visible>
                        </item>
                        <item>
                        <label>$INFO[Container(524).ListItemAbsolute(9).Label]</label>
                        <label2>$INFO[Container(524).ListItemAbsolute(9).Label,resource://resource.images.actorart/,.png]</label2>
                        <visible>!String.IsEmpty(Control.GetLabel(2449))</visible>
                        </item>
                        <item>
                        <label>$INFO[Container(524).ListItemAbsolute(10).Label]</label>
                        <label2>$INFO[Container(524).ListItemAbsolute(10).Label,resource://resource.images.actorart/,.png]</label2>
                        <visible>!String.IsEmpty(Control.GetLabel(2450))</visible>
                        </item>
                        <item>
                        <label>$INFO[Container(524).ListItemAbsolute(11).Label]</label>
                        <label2>$INFO[Container(524).ListItemAbsolute(11).Label,resource://resource.images.actorart/,.png]</label2>
                        <visible>!String.IsEmpty(Control.GetLabel(2451))</visible>
                        </item>
                        <item>
                        <label>$INFO[Container(524).ListItemAbsolute(12).Label]</label>
                        <label2>$INFO[Container(524).ListItemAbsolute(12).Label,resource://resource.images.actorart/,.png]</label2>
                        <visible>!String.IsEmpty(Control.GetLabel(2452))</visible>
                        </item>
                        <item>
                        <label>$INFO[Container(524).ListItemAbsolute(13).Label]</label>
                        <label2>$INFO[Container(524).ListItemAbsolute(13).Label,resource://resource.images.actorart/,.png]</label2>
                        <visible>!String.IsEmpty(Control.GetLabel(2453))</visible>
                        </item>
                        <item>
                        <label>$INFO[Container(524).ListItemAbsolute(14).Label]</label>
                        <label2>$INFO[Container(524).ListItemAbsolute(14).Label,resource://resource.images.actorart/,.png]</label2>
                        <visible>!String.IsEmpty(Control.GetLabel(2454))</visible>
                        </item>
                        <item>
                        <label>$INFO[Container(524).ListItemAbsolute(15).Label]</label>
                        <label2>$INFO[Container(524).ListItemAbsolute(15).Label,resource://resource.images.actorart/,.png]</label2>
                        <visible>!String.IsEmpty(Control.GetLabel(2455))</visible>
                        </item>
                        <item>
                        <label>$INFO[Container(524).ListItemAbsolute(16).Label]</label>
                        <label2>$INFO[Container(524).ListItemAbsolute(16).Label,resource://resource.images.actorart/,.png]</label2>
                        <visible>!String.IsEmpty(Control.GetLabel(2456))</visible>
                        </item>
                        <item=xml>
                        <label>$INFO[Container(524).ListItemAbsolute(17).Label]</label>
                        <label2>$INFO[Container(524).ListItemAbsolute(17).Label,resource://resource.images.actorart/,.png]</label2>
                        <visible>!String.IsEmpty(Control.GetLabel(2457))</visible>
                        </item>
                        <item>
                        <label>$INFO[Container(524).ListItemAbsolute(18).Label]</label>
                        <label2>$INFO[Container(524).ListItemAbsolute(18).Label,resource://resource.images.actorart/,.png]</label2>
                        <visible>!String.IsEmpty(Control.GetLabel(2458))</visible>
                        </item>
                        <item>
                        <label>$INFO[Container(524).ListItemAbsolute(19).Label]</label>
                        <label2>$INFO[Container(524).ListItemAbsolute(19).Label,resource://resource.images.actorart/,.png]</label2>
                        <visible>!String.IsEmpty(Control.GetLabel(2459))</visible>
                        </item>
                        <item>
                        <label>$INFO[Container(524).ListItemAbsolute(20).Label]</label>
                        <label2>$INFO[Container(524).ListItemAbsolute(20).Label,resource://resource.images.actorart/,.png]</label2>
                        <visible>!String.IsEmpty(Control.GetLabel(2460))</visible>
                        </item>
                        <item>
                        <label=xml>$INFO[Container(524).ListItemAbsolute(21).Label]</label>
                        <label2>$INFO[Container(524).ListItemAbsolute(21).Label,resource://resource.images.actorart/,.png]</label2>
                        <visible>!String.IsEmpty(Control.GetLabel(2461))</visible>
                        </item>
                        <item>
                        <label>$INFO[Container(524).ListItemAbsolute(22).Label]</label>
                        <label2>$INFO[Container(524).ListItemAbsolute(22).Label,resource://resource.images.actorart/,.png]</label2>
                        <visible>!String.IsEmpty(Control.GetLabel(2462))</visible>
                        </item>
                        <item>
                        <label>$INFO[Container(524).ListItemAbsolute(23).Label]</label>
                        <label2>$INFO[Container(524).ListItemAbsolute(23).Label,resource://resource.images.actorart/,.png]</label2>
                        <visible>!String.IsEmpty(Control.GetLabel(2463))</visible>
                        </item>
                        <item>
                        <label>$INFO[Container(524).ListItemAbsolute(24).Label]</label>
                        <label2>$INFO[Container(524).ListItemAbsolute(24).Label,resource://resource.images.actorart/,.png]</label2>
                        <visible>!String.IsEmpty(Control.GetLabel(2464))</visible>
                        </item>
                        <item>
                        <label>[color=$INFO[Skin.String(colorheader)]]$LOCALIZE[206]:[/color][CR][COLOR white]$INFO[Container(524).ListItemAbsolute(0).Label][CR]$INFO[Container(524).ListItemAbsolute(1).Label][CR]$INFO[Container(524).ListItemAbsolute(2).Label][CR]$INFO[Container(524).ListItemAbsolute(3).Label][CR]$INFO[Container(524).ListItemAbsolute(4).Label][CR]$INFO[Container(524).ListItemAbsolute(5).Label][CR]$INFO[Container(524).ListItemAbsolute(6).Label][CR]$INFO[Container(524).ListItemAbsolute(7).Label][CR]$INFO[Container(524).ListItemAbsolute(8).Label][CR]$INFO[Container(524).ListItemAbsolute(9).Label][/COLOR]</label>
                        <label2>Cast</label2>
                        <visible>!Control.IsVisible(596) + !Control.IsVisible(589)</visible>
                        </item>
                    </content>
                </control>
                </control>
    </include>

In MyVideoNav.xml

xml:
<control type="group">
            <include condition="Skin.HasSetting(showCast) + System.HasAddon(script.embuary.helper)">DisplayCast</include>
        </control>
        <control type="group">
            <include condition="Skin.HasSetting(showCast) + System.HasAddon(script.embuary.helper) + System.HasAddon(resource.images.actorart)">DisplayPngCast</include>
        </control>

In AnyView.xml

xml:
<control type="textbox">
    <visible>[!System.IdleTime(3) | Integer.IsLess(Container(534).NumItems,2)] + !ListItem.IsCollection + Skin.HasSetting(showCast)</visible>
    <fadetime>300</fadetime>
    <font>Font_plot4</font>
    <align>left</align>
    <left>1068</left>
    <top>127</top>
    <width>220</width>
    <height>332</height>
    <label>[color=$INFO[Skin.String(colorheader)]]$LOCALIZE[206]:[/color][CR][COLOR white]$INFO[Container(524).ListItemAbsolute(0).Label][CR]$INFO[Container(524).ListItemAbsolute(1).Label][CR]$INFO[Container(524).ListItemAbsolute(2).Label][CR]$INFO[Container(524).ListItemAbsolute(3).Label][CR]$INFO[Container(524).ListItemAbsolute(4).Label][CR]$INFO[Container(524).ListItemAbsolute(5).Label][CR]$INFO[Container(524).ListItemAbsolute(6).Label][CR]$INFO[Container(524).ListItemAbsolute(7).Label][CR]$INFO[Container(524).ListItemAbsolute(8).Label][CR]$INFO[Container(524).ListItemAbsolute(9).Label][/COLOR]</label>
</control>
<control type="image">
    <visible>Integer.IsGreater(Container(534).NumItems,1) + !ListItem.IsCollection + Skin.HasSetting(showCast)</visible>
        <include>HiddenObject</include>
        <texture background="true">$INFO[Container(534).ListItem.Label2]</texture>                    
</control>
<control type="group">
    <control type="textbox">
        <visible>System.IdleTime(3) + Integer.IsGreater(Container(534).NumItems,1) + !ListItem.IsCollection + Skin.HasSetting(showCast)</visible>
        <visible>!String.IsEqual(Container(534).ListItem.Label2,Cast)</visible>
        <fadetime>200</fadetime>
        <textcolor>$INFO[Skin.String(colorheader)]</textcolor>
        <font>Font_plot4</font>
        <align>center</align>
        <aligny>top</aligny>
        <left>1055</left>
        <top>415</top>
        <width>220</width>
        <height>80</height>
        <label>$INFO[Container(534).ListItem.Label]</label>
    </control>
    <control type="textbox">
        <visible>System.IdleTime(3) + Integer.IsGreater(Container(534).NumItems,1) + !ListItem.IsCollection + Skin.HasSetting(showCast)</visible>
        <visible>String.IsEqual(Container(534).ListItem.Label2,Cast)</visible>
        <fadetime>200</fadetime>
        <textcolor>$INFO[Skin.String(colorheader)]</textcolor>
        <font>Font_plot4</font>
        <align>left</align>
        <aligny>top</aligny>
        <left>1068</left>
        <top>127</top>
        <width>220</width>
        <height>332</height>
        <label>$INFO[Container(534).ListItem.Label]</label>
    </control>
    <control type="image">
        <visible>System.IdleTime(3) + Integer.IsGreater(Container(534).NumItems,1) + !ListItem.IsCollection + Skin.HasSetting(showCast)</visible>
        <left>1065</left>
        <top>127</top>
        <width>195</width>
        <height>280</height>
        <colordiffuse>DFffffff</colordiffuse>
        <aspectratio alignx="left" aligny="bottom">keep</aspectratio>
        <fadetime>200</fadetime>
        <texture background="true">$INFO[Container(534).ListItem.Label2]</texture>                    
    </control>
</control>
Adding the xml-type to a syntax tag in the forum editor will get you nice colors. (Check the post's source code)
It can also make visible certain mistakes.

Check the colors in the first xml listing.
I don't know if those is 'the' mistakes, but every little thing helps.
(2019-07-11, 07:47)Klojum Wrote: [ -> ]Adding the xml-type to a syntax tag in the forum editor will get you nice colors. (Check the post's source code)
It can also make visible certain mistakes.

Check the colors in the first xml listing.
I don't know if those is 'the' mistakes, but every little thing helps.
my extended notepad++ has a nice coloring and good formatting.
But the code stays the same whether in Leia or Krypton the same.
But it's working in Leia fine, but in Krypton nothing.

So i think it's more up to an difference in the Leia-Krypton Skinning engine, than any "mistake", do you agree?
I searched a lot the skinning wiki and found nothing in function what could explain this behavior. Something nowhere described must be different Leia-Krypton!
Adding properties to a (closing) tag might hinder a skin engine.
=> e.g. </item=xml>
(2019-07-11, 07:59)Klojum Wrote: [ -> ]Adding properties to a (closing) tag might hinder a skin engine.
=> e.g. </item=xml>
That was a failure of too much paste/copy work (notepad->drive->forum)
It's all clear in the original code. 

But thank you very much to have looked into the code, I think almost 95% will have no idea what's going on here.
Can you describe what the problem is that you are having on Krypton. What happens and what do you expect to happen?
Tried to install script.embuary.helper and got 'The dependency on xbmc.python version 2.26.0 could not be satisfied' message.
(2019-07-11, 09:09)Hitcher Wrote: [ -> ]Tried to install script.embuary.helper and got 'The dependency on xbmc.python version 2.26.0 could not be satisfied' message.
There exist a own Leia version (master) and a ported Krypton version.
The Krypton version to this code is working fine cause in the log it's trying to fetch all images, no errors.
I notice in your item controls you don't have any <onclick>noop</onclick> values which were required before Leia.
(2019-07-11, 09:42)Hitcher Wrote: [ -> ]I notice in your item controls you don't have any <onclick>noop</onclick> values which were required before Leia.
As far as now to the solution i wasn't ever before!
Great thanks for the tip!
I can see now the images! But it's ignoring the scrolltime, images are changing in lightspeed!
Any advice?
(2019-07-11, 10:31)Hitcher Wrote: [ -> ]Changes to the skinning engine for Kodi Leia
2017-03-17 onclick made optional for static listitems
still not get it to work with predefied scrolltime
I like to help in the forum.kodi in topic where i can, now i definitely need your help.
Might be a result of getting them from a list to another control. Why not use the list itself in the view?
Did you put the code inside the focusedlayout or itemlayout section in the video view xml? I think it should go outside...
Pages: 1 2