Kodi Community Forum
Loading Dynamic List Content at start - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Skinning (https://forum.kodi.tv/forumdisplay.php?fid=12)
+--- Thread: Loading Dynamic List Content at start (/showthread.php?tid=216257)

Pages: 1 2 3 4 5


RE: Loading Dynamic List Content at start - Piers - 2015-01-28

Update: Nope. Still can't get it to work.


RE: Loading Dynamic List Content at start - senna99 - 2015-01-28

How is it possible to?


RE: Loading Dynamic List Content at start - Piers - 2015-01-28

Here's my (not completely finished) code, maybe I've made a mistake.

Code:
                        <control type="wraplist" id="9022">
                            <onfocus>CancelAlarm(HomeTileMove,true)</onfocus>
                            <posx>0</posx>
                            <posy>0</posy>
                            <width>729</width>
                            <height>572</height>
                            <preloaditems>2</preloaditems>
                            <pagecontrol>9024</pagecontrol>
                            <viewtype label="List">List</viewtype>
                            <scrolltime tween="sine" easing="out">500</scrolltime>
                            <orientation>vertical</orientation>
                            <visible allowhiddenfocus="true">IntegerGreaterThan(Container(9022).NumItems,0)</visible>
                            <include>visiblehidefadeinfodelayvisible</include>
                        <itemlayout width="729" height="115">
                            <control type="image">
                                <posx>0</posx>
                                <posy>0</posy>
                                <width>112</width>
                                <height>112</height>
                                <aspectratio>stretch</aspectratio>
                                <texture>$INFO[ListItem.Icon]</texture>
                            </control>
                            <control type="label">
                                <posx>140</posx>
                                <posy>2</posy>
                                <width>580</width>
                                <height>40</height>
                                <info>ListItem.Label</info>
                                <font>Font-Condensed-S33-B</font>
                                <textcolor>white</textcolor>
                                <align></align>
                            </control>
                            <control type="label">
                                <posx>140</posx>
                                <posy>26</posy>
                                <width>570</width>
                                <height>60</height>
                                <label>$LOCALIZE[19030]: $INFO[ListItem.Title]</label>
                                <font>Font-Condensed-S29</font>
                                <textcolor>aawhite</textcolor>
                                <align></align>
                            </control>
                            <control type="label">
                                <posx>140</posx>
                                <posy>59</posy>
                                <width>570</width>
                                <height>60</height>
                                <label>$LOCALIZE[19031]: $INFO[ListItem.NextTitle] ($INFO[ListItem.StartTime])</label>
                                <font>Font-Condensed-S29</font>
                                <textcolor>aawhite</textcolor>
                                <align></align>
                            </control>
                        </itemlayout>
                        <focusedlayout width="729" height="115">
                            <control type="image">
                                <description>Channel underlay</description>
                                <posx>0</posx>
                                <posy>0</posy>
                                <width>729</width>
                                <height>112</height>
                                <texture border="1">windows/home/pvr-widget-back.png</texture>
                                <colordiffuse>99FFFFFF</colordiffuse>
                            </control>
                            <control type="image">
                                <posx>0</posx>
                                <posy>0</posy>
                                <width>112</width>
                                <height>112</height>
                                <aspectratio>stretch</aspectratio>
                                <texture>$INFO[ListItem.Icon]</texture>
                            </control>
                            <control type="label">
                                <posx>140</posx>
                                <posy>2</posy>
                                <width>580</width>
                                <height>40</height>
                                <info>ListItem.Label</info>
                                <font>Font-Condensed-S33-B</font>
                                <textcolor>white</textcolor>
                                <align></align>
                            </control>
                            <control type="label">
                                <posx>140</posx>
                                <posy>26</posy>
                                <width>570</width>
                                <height>60</height>
                                <label>$LOCALIZE[19030]: $INFO[ListItem.Title]</label>
                                <font>Font-Condensed-S29</font>
                                <textcolor>aawhite</textcolor>
                                <align></align>
                            </control>
                            <control type="label">
                                <posx>140</posx>
                                <posy>59</posy>
                                <width>570</width>
                                <height>60</height>
                                <label>$LOCALIZE[19031]: $INFO[ListItem.NextTitle] ($INFO[ListItem.StartTime])</label>
                                <font>Font-Condensed-S29</font>
                                <textcolor>aawhite</textcolor>
                                <align></align>
                            </control>
                            <control type="image">
                                <posx>0</posx>
                                <posy>110</posy>
                                <width>440</width>
                                <height>4</height>
                                <texture>osd/media-guide/line.png</texture>
                                <aspectratio>stretch</aspectratio>
                                <colordiffuse>white</colordiffuse>
                            </control>
                        </focusedlayout>
                                <content target="video">pvr://channels/tv/All&amp;channels/</content>
                </control>



RE: Loading Dynamic List Content at start - Gade - 2015-01-28

Reemember, that
Code:
Skin.HasSetting(HidePVRChannelsWidget)
is exclusive to Rapier. You might want to change that Smile


RE: Loading Dynamic List Content at start - senna99 - 2015-01-28

You're right,there is something wrong all the time I get a message error.error data pvr libery.
This is without Startup.xml,Kodi open first MyWeather not home menu,after ten seconds channels are loaded in list.
Now I just do not understand,why not work with my Startup.xml.



Image


RE: Loading Dynamic List Content at start - Gade - 2015-01-28

Suddenly this is not working for me either.

Everything worked perfectly with Startup.xml this night, but now I'm back to the exact same problem. I have absolutely no idea why, as I haven't changed one letter in the code.


RE: Loading Dynamic List Content at start - senna99 - 2015-01-28

I will try fresh installation of Kodi without Startup.xml from Amber .


RE: Loading Dynamic List Content at start - senna99 - 2015-01-28

All working with this combination,modified Startup.xml.
But now after 20 seconds,pvr manager loaded the channels.And I have to use backspace button to go in home panel.

<window id="2999">
<defaultcontrol always="true">11</defaultcontrol>
<allowoverlay>yes</allowoverlay>
<onload condition="Window.Previous(29) + Skin.SetString(signin,3030)">Skin.SetString(signin,3030)</onload>
<onload condition="!Window.Previous(29) + !Skin.SetString(signin,3030)">Skin.SetString(signin,3030)</onload>
<control type="button" id="11">
<left>1300</left>
<onfocus>SetFocus(11)</onfocus>
</control>
</controls>
</window>


RE: Loading Dynamic List Content at start - Piers - 2015-01-28

(2015-01-28, 12:32)Gade Wrote: Reemember, that
Code:
Skin.HasSetting(HidePVRChannelsWidget)
is exclusive to Rapier. You might want to change that Smile

I did change that bit, but like you, it's not working for some reason. Odd behaviour.


RE: Loading Dynamic List Content at start - Gade - 2015-01-28

It's so weird.

Like I wrote, I got everything working perfectly this night. But when I tried in the morning, I was back to the same issues as you...


RE: Loading Dynamic List Content at start - senna99 - 2015-01-28

Hello Gade

What do you use in startup xml ?


RE: Loading Dynamic List Content at start - Gade - 2015-01-28

Hi senna99.

I got this code working perfectly last night
PHP Code:
<?xml version="1.0" encoding="UTF-8"?>
<window>
    <defaultcontrol always="true">10</defaultcontrol>
    <allowoverlay>no</allowoverlay>    
    <controls>
        <control type="button" id="10">
            <left>1300</left>
            <onfocus condition="!System.GetBool(pvrmanager.enabled) | [System.GetBool(pvrmanager.enabled) + Skin.HasSetting(HidePVRChannelsWidget)]">ReplaceWindow($INFO[System.StartupWindow])</onfocus>
            <onfocus condition="System.GetBool(pvrmanager.enabled) + !Skin.HasSetting(HidePVRChannelsWidget)">SetFocus(11)</onfocus>
        </control>
        <!-- Show home if pvr loading is finished -->
        <control type="button" id="11">
            <left>1300</left>
            <onfocus>SetFocus(11)</onfocus>
            <visible>IsEmpty(Videos,pvr://channels/tv/)</visible>
        </control>
        <control type="button" id="11">
            <left>1300</left>
            <onfocus>ReplaceWindow($INFO[System.StartupWindow])</onfocus>
            <visible>!IsEmpty(Videos,pvr://channels/tv/)</visible>
        </control>    
    </controls>
</window> 

I also have a couple of onloads, but that shouldn't complicate things.

EDIT: I got it working both with PVR disabled, which goes directly to the home screen. And with PVR enabled, which waits for the channels to load. Also it worked beautifully both with the skin setting enabled and disabled.


RE: Loading Dynamic List Content at start - Piers - 2015-01-28

(2015-01-28, 18:43)Gade Wrote: Hi senna99.

I got this code working perfectly last night
PHP Code:
<?xml version="1.0" encoding="UTF-8"?>
<window>
    <defaultcontrol always="true">10</defaultcontrol>
    <allowoverlay>no</allowoverlay>    
    <controls>
        <control type="button" id="10">
            <left>1300</left>
            <onfocus condition="!System.GetBool(pvrmanager.enabled) | [System.GetBool(pvrmanager.enabled) + Skin.HasSetting(HidePVRChannelsWidget)]">ReplaceWindow($INFO[System.StartupWindow])</onfocus>
            <onfocus condition="System.GetBool(pvrmanager.enabled) + !Skin.HasSetting(HidePVRChannelsWidget)">SetFocus(11)</onfocus>
        </control>
        <!-- Show home if pvr loading is finished -->
        <control type="button" id="11">
            <left>1300</left>
            <onfocus>SetFocus(11)</onfocus>
            <visible>IsEmpty(Videos,pvr://channels/tv/)</visible>
        </control>
        <control type="button" id="11">
            <left>1300</left>
            <onfocus>ReplaceWindow($INFO[System.StartupWindow])</onfocus>
            <visible>!IsEmpty(Videos,pvr://channels/tv/)</visible>
        </control>    
    </controls>
</window> 

I also have a couple of onloads, but that shouldn't complicate things.

EDIT: I got it working both with PVR disabled, which goes directly to the home screen. And with PVR enabled, which waits for the channels to load. Also it worked beautifully both with the skin setting enabled and disabled.

But it's not working now?


RE: Loading Dynamic List Content at start - Gade - 2015-01-28

Nope, not when I tested around 11 today. I'm at work right now, so I will do some more testing tonight.

EDIT: Just tried installing the update with the above code in Startup.xml on my iPad here at work, and now everything works exactly as expected.

Is it working at your end?


RE: Loading Dynamic List Content at start - senna99 - 2015-01-28

Is it possible this all,is one big mystery?