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


Loading Dynamic List Content at start - Piers - 2015-01-25

I have a dynamic list set on the home window, loading PVR content - http://forum.kodi.tv/showthread.php?tid=213990

However, when the skin starts up I have to use a ReloadSkin button I made in order for it to load the content where I want it (otherwise it's not displayed). From my understanding of dynamic list content, it should load when requested, sort of (I've only just read up/learnt about this feature).

Maybe what I should ask is, why is there a need to to reload the skin in order for the content to be displayed?


RE: Loading Dynamic List Content at start - butchabay - 2015-01-25

No, normally reload skin is not required. Maybe pvr stuff is handled in a different way.


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

(2015-01-25, 21:05)butchabay Wrote: No, normally reload skin is not required. Maybe pvr stuff is handled in a different way.

That's what I've been thinking, I've spoken to another user who uses that and it required smartish.widgets and multiple lines just to get that working - surely it can't require more code than the actual content it provides?


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

Hi Piers.

I just did the exact same thing yesterday (got the idea from the same thread), and encountered the same issue as you.

Do you use the PVR Demo add-on? Maybe it's specific for that add-on and working with regular pvr add-ons. Haven't tested this yet though.


RE: Loading Dynamic List Content at start - DjCisco - 2015-01-26

If this only happens on kodi start up, I would guess its because kodi has to first load the channel list.

If you start kodi and the channel list does not appear via dyanmic content, its probably because at the moment of trying to load the channel list via the content tag, the pvr channels have not yet been loaded by kodi.

Remember that loading content via dynamic method is quite fast, while loading the pvr channels by kodi takes a bit longer.


RE: Loading Dynamic List Content at start - Angelinas - 2015-01-26

Perhaps here we get to the enough speed of starting PVR
https://github.com/xbmc/xbmc/pull/6246
Do not give up of dynamic list for PVR.


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

Yep, this does appear to be the problem - waiting for the PVR back-end to load means the list doesn't populate from the source.

Maybe I missed the section, is it possible to add a delay to the loading for dynamic content list types?

(2015-01-26, 11:22)Gade Wrote: Hi Piers.

I just did the exact same thing yesterday (got the idea from the same thread), and encountered the same issue as you.

Do you use the PVR Demo add-on? Maybe it's specific for that add-on and working with regular pvr add-ons. Haven't tested this yet though.

I use both the Demo add-on and the DVBViewer add-on Sad

It's a beautiful way of performing the action, I really like it. Here's what I've managed to do with it:

Image.

If only I could delay that by five-10 seconds Sad The problem also happens when going the very long method of doing the same thing, it won't load because the PVR has to load first.


RE: Loading Dynamic List Content at start - MassIV - 2015-01-27

Can't you just bounce focus between two buttons in startup.xml until your path isn't empty? And then send it on to home.xml?
I think the skin Amber used something like that that for skin widgets. Jup still there https://github.com/pecinko/skin.amber/blob/master/1080i/Startup.xml


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

(2015-01-27, 19:03)MassIV Wrote: Can't you just bounce focus between two buttons in startup.xml until your path isn't empty? And then send it on to home.xml?
I think the skin Amber used something like that that for skin widgets. Jup still there https://github.com/pecinko/skin.amber/blob/master/1080i/Startup.xml

I tried that as one of the first options, I can't appear to make it work. There just doesn't seem to be a way to wait for dynamic list content from the PVR to load.


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

(2015-01-26, 19:21)Piers Wrote:
(2015-01-26, 11:22)Gade Wrote: Hi Piers.

I just did the exact same thing yesterday (got the idea from the same thread), and encountered the same issue as you.

Do you use the PVR Demo add-on? Maybe it's specific for that add-on and working with regular pvr add-ons. Haven't tested this yet though.

I use both the Demo add-on and the DVBViewer add-on Sad

It's a beautiful way of performing the action, I really like it. Here's what I've managed to do with it:

--img--

If only I could delay that by five-10 seconds Sad The problem also happens when going the very long method of doing the same thing, it won't load because the PVR has to load first.

I really like what you did - it's very useful.

I actually think I found a working solution using MassIV's suggestion from Amber.

Startup.xml:
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 have never used a visible condition like this and don't even know if it's possible, although it seems to be working very well.

Could you please test this?


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

(2015-01-28, 02:35)Gade Wrote:
(2015-01-26, 19:21)Piers Wrote:
(2015-01-26, 11:22)Gade Wrote: Hi Piers.

I just did the exact same thing yesterday (got the idea from the same thread), and encountered the same issue as you.

Do you use the PVR Demo add-on? Maybe it's specific for that add-on and working with regular pvr add-ons. Haven't tested this yet though.

I use both the Demo add-on and the DVBViewer add-on Sad

It's a beautiful way of performing the action, I really like it. Here's what I've managed to do with it:

--img--

If only I could delay that by five-10 seconds Sad The problem also happens when going the very long method of doing the same thing, it won't load because the PVR has to load first.

I really like what you did - it's very useful.

I actually think I found a working solution using MassIV's suggestion from Amber.

Startup.xml:
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 have never used a visible condition like this and don't even know if it's possible, although it seems to be working very well.

Could you please test this?

Thank you - Just tested, same issue - it's similar to what I tried to use in the first place, although I made a typo - it still only works when reloading the skin Sad


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

Yes this combination works,with Startup.xml. I just tested on Kodi 15.0

--------------Startup.xml--------------------------------------
<?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>
---------------end------------------------------------------

---------------includes Home-----------------------------
<control type="list" id="11">
<posx>760</posx>
<posy>0</posy>
<width>685</width>
<height>670</height>
<onleft>405</onleft>
<onright>404</onright>
<onup>926</onup>
<ondown></ondown>
<focuspostion>1</focuspostion>
<orientation>vertical</orientation>
<scrolltime>220</scrolltime>
<itemlayout width="807" height="130">
<control type="label">
<posx>170</posx>
<posy>5</posy>
<width>700</width>
<height>62</height>
<info>ListItem.Label</info>
<font>font13_title</font>
<textcolor>white</textcolor>
<align></align>
</control>
</itemlayout>
<focusedlayout width="807" height="130">
<control type="label">
<posx>170</posx>
<posy>5</posy>
<width>700</width>
<height>62</height>
<info>ListItem.Label</info>
<font>font13_title</font>
<textcolor>white</textcolor>
<align></align>
</control>
</focusedlayout>
<content target="video">pvr://channels/tv/All&amp;channels/</content>
</control>
-------------------------------end--------------------------------------------


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

You might want to add some overridding on action controls to the buttons in case something goes wrong so the user can still load Kodi.


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

(2015-01-28, 07:57)senna99 Wrote: Yes this combination works,with Startup.xml. I just tested on Kodi 15.0

--------------Startup.xml--------------------------------------
<?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>
---------------end------------------------------------------

---------------includes Home-----------------------------
<control type="list" id="11">
<posx>760</posx>
<posy>0</posy>
<width>685</width>
<height>670</height>
<onleft>405</onleft>
<onright>404</onright>
<onup>926</onup>
<ondown></ondown>
<focuspostion>1</focuspostion>
<orientation>vertical</orientation>
<scrolltime>220</scrolltime>
<itemlayout width="807" height="130">
<control type="label">
<posx>170</posx>
<posy>5</posy>
<width>700</width>
<height>62</height>
<info>ListItem.Label</info>
<font>font13_title</font>
<textcolor>white</textcolor>
<align></align>
</control>
</itemlayout>
<focusedlayout width="807" height="130">
<control type="label">
<posx>170</posx>
<posy>5</posy>
<width>700</width>
<height>62</height>
<info>ListItem.Label</info>
<font>font13_title</font>
<textcolor>white</textcolor>
<align></align>
</control>
</focusedlayout>
<content target="video">pvr://channels/tv/All&amp;channels/</content>
</control>
-------------------------------end--------------------------------------------

Woah, I should have referenced the original post - I changed too much, which is why it didn't work. Going to test now with the corrected version... reporting back in a min.


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

I do not understand,but anyway i have a problem with Startup.xml.
Because I use different line in startup including intro mp4,now when I not use startup, dynamic list works perfectly.
I can not put line from Amber startup together in my startup xml.Something is wrong.
This is my original Startup.xml

<window id="2999">
<defaultcontrol always="true">10</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>
<controls>
<include>Common_Busy</include>
<control type="button" id="10">
<onfocus>ReplaceWindow(Home)</onfocus>
<onfocus condition="IsEmpty(Skin.String(GamerPicture))">Skin.SetString(GamerPicture,special://skin/system/D400040/gamertag/pictures/Master user.png)</onfocus>
<onfocus condition="IsEmpty(Skin.String(GamerColor))">Skin.SetString(GamerColor,special://skin/system/D400040/colors/Bland 50%/black.png)</onfocus>
<onfocus condition="IsEmpty(Skin.String(GamerTheme))">Skin.SetString(GamerTheme,special://skin/system/0200020/start.jpg)</onfocus>
</control>
</controls>
<onload>Skin.SetString(snapxp,1117)</onload>
<onload>Skin.SetString(music,3033)</onload>
<onload>Skin.SetString(video,3033)</onload>
<onload>Skin.SetString(Xbox One First Start,101)</onload>
<onload>PlayMedia(special://skin/system/0100010/boot.mp4,0,)</onload>
<onload>special://skin/system/0300030/xbox1.py</onload>
<onload>special://skin/system/0300030/xbox2.py</onload>
<onload>special://skin/system/0300030/xbox3.py</onload>
<onload>special://skin/system/0300030/xbox4.py</onload>
<onload>special://skin/system/0300030/bing.py</onload>
<onload>special://skin/system/D400040/gamertag/pictures/$INFO[System.ProfileName].png</onload>
<onunload Condition="!System.InternetState">Notification(Hi[CR]$INFO[System.ProfileName] ,Singed In,00:59,special://skin/system/D400040/gamertag/pictures/$INFO[System.ProfileName].png)</onunload>
</window>