Kodi Community Forum

Full Version: Problems with a new view, looking for suggestions.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have been working on adding a new view to my skin and while it is basically working, there are a couple of issues that I can't figure out how to resolve. Could someone please offer some suggestions?

This is a screengrab of the view at the moment.
Image

Code:
<include name="CategoryLabel">
        <definition>
            <control type="label" id="$PARAM[list_id]2">
                <left>0</left>
                <top>5</top>
                <width>689</width>
                <height>50</height>
                <font>apptv20</font>
                <align>left</align>
                <label>$PARAM[label]</label>
                <visible>$PARAM[list_visible]</visible>
                <visible>Container(59).IsUpdating | Integer.IsGreater(Container(59).NumItems,1) | Container($PARAM[list_id]).IsUpdating | Integer.IsGreater(Container($PARAM[list_id]).NumItems,0)</visible>
            </control>
        </definition>
    </include>
    <include name="WidgetListPoster">
        <param name="content_path"></param>
        <param name="widget_header"></param>
        <param name="list_id"></param>
        <param name="list_visible"></param>
        <definition>
            <include content="CategoryLabel">
                <param name="label" value="$PARAM[widget_header]"/>
                <param name="list_id" value="$PARAM[list_id]"/>
                <param name="list_visible" value="$PARAM[list_visible]"/>
            </include>
            <include content="page-offscreen-horizontal">
                <param name="indicator1left" value="0"/>
                <param name="indicator1top" value="-185"/>
                <param name="indicator2left" value="1872"/>
                <param name="indicator2top" value="-185"/>
                <param name="indicatorsize" value="32"/>
                <param name="indicatorcontainer" value="$PARAM[list_id]"/>
            </include>
            <control type="panel" id="$PARAM[list_id]">
                <left>0</left>
                <top>55</top>
                <width>1800</width>
                <height>260</height>
                <scrolltime tween="cubic" easing="out">200</scrolltime>
                <orientation>horizontal</orientation>
                <onleft>9000</onleft>
                <onright>9000</onright>
                <visible>$PARAM[list_visible]</visible>
                <visible>Container(59).IsUpdating | Integer.IsGreater(Container(59).NumItems,1) | Container($PARAM[list_id]).IsUpdating | Integer.IsGreater(Container($PARAM[list_id]).NumItems,0)</visible>
                <itemlayout width="200">
                    <control type="image">
                        <left>40</left>
                        <top>10</top>
                        <width>120</width>
                        <height>158</height>
                        <aspectratio scalediffuse="false">stretch</aspectratio>
                        <texture diffuse="mask-rect.png" background="true">$VAR[IconPoster]</texture>
                    </control>
                </itemlayout>
                <focusedlayout width="200">
                    <control type="image">
                        <left>40</left>
                        <top>10</top>
                        <width>120</width>
                        <height>158</height>
                        <aspectratio scalediffuse="false">stretch</aspectratio>
                        <texture diffuse="mask-rect.png" background="true">$VAR[IconPoster]</texture>
                        <animation effect="zoom" start="100" end="106" center="auto" time="200" tween="back" easing="out" reversible="false">focus</animation>
                    </control>
                    <control type="textbox">
                        <left>0</left>
                        <top>170</top>
                        <height>62</height>
                        <width>200</width>
                        <font>apptv18</font>
                        <align>center</align>
                        <aligny>top</aligny>
                        <label>$INFO[ListItem.Label]</label>
                        <animation effect="fade" time="100" delay="100">Focus</animation>
                        <visible>Control.HasFocus($PARAM[list_id])</visible>
                    </control>
                </focusedlayout>
                <content target="$PARAM[widget_target]" limit="15">$PARAM[content_path]</content>
            </control>
        </definition>
    </include>
    <include name="WidgetView">
        <control type="fixedlist" id="59">
            <viewtype label="31973">list</viewtype>
            <left>-10</left>
            <top>-10</top>
            <width>1</width>
            <height>1</height>
            <onleft>9000</onleft>
            <onright>9000</onright>
            <onfocus>SetFocus(5900)</onfocus>
            <onfocus>SetFocus(5900)</onfocus>
            <onback>SetFocus(59)</onback>
            <itemlayout/>
            <focusedlayout/>
        </control>
        <control type="grouplist" id="5900">
            <left>75</left>
            <top>110</top>
            <height>930</height>
            <width>1890</width>
            <itemgap>0</itemgap>
            <align>left</align>
            <scrolltime tween="quadratic" easing="out">200</scrolltime>
            <onup>Control.Move(59,-1)</onup>
            <ondown>Control.Move(59,1)</ondown>
            <onback>SetFocus(59)</onback>
            <orientation>vertical</orientation>
            <visible>Control.IsVisible(59)</visible>
            <include content="WidgetListPoster">
                <param name="content_path" value="$VAR[WidgetViewList0]"/>
                <param name="widget_header" value="$INFO[Container(59).Listitem(0).Label]"/>
                <param name="widget_target" value="videos"/>
                <param name="list_id" value="5905"/>
                <param name="list_visible" value="![String.IsEqual(Container(59).Listitem(0).Label,..)]"/>
            </include>
            <include content="WidgetListPoster">
                <param name="content_path" value="$VAR[WidgetViewList1]"/>
                <param name="widget_header" value="$INFO[Container(59).Listitem(1).Label]"/>
                <param name="widget_target" value="videos"/>
                <param name="list_id" value="5910"/>
                <param name="list_visible" value="![String.IsEqual(Container(59).Listitem(1).Label,..)]"/>
            </include>
            <include content="WidgetListPoster">
                <param name="content_path" value="$VAR[WidgetViewList2]"/>
                <param name="widget_header" value="$INFO[Container(59).Listitem(2).Label]"/>
                <param name="widget_target" value="videos"/>
                <param name="list_id" value="5915"/>
                <param name="list_visible" value="![String.IsEqual(Container(59).Listitem(2).Label,..)]"/>
            </include>
            <include content="WidgetListPoster">
                <param name="content_path" value="$VAR[WidgetViewList3]"/>
                <param name="widget_header" value="$INFO[Container(59).Listitem(3).Label]"/>
                <param name="widget_target" value="videos"/>
                <param name="list_id" value="5920"/>
                <param name="list_visible" value="![String.IsEqual(Container(59).Listitem(3).Label,..)]"/>
            </include>
        </control>
    </include>

So the problems at the moment are:
  1. For the first three (or four if parent item is turned off) I can scroll down and have the focused item show its focused item label. after that the focused item label is not shown, but can still scroll down the widget lists. If I use the mouse to bring the focus back to one of the items I can then continue to scroll without losing the display of the label.
  2. The arrows from page-offscreen-horizontal include display one above the other instead of appearing where I positioned them with the includes parameters. They are two seperate images with their own id numbers and that is basically it for the include. No groups , just two image controls.
  3. And this is the show stopper at this stage. View works pretty well from TV Show season level of library, but when I try to use the view with the Netflix addon, Kodi crashes back to the desktop. NO crashlog, no errors in Kodi's log file, just stops cold.  Is this my code, or is this something to do with a couple bugs about URL's that are due to be fixed for 19.4?
Any suggestions?

Wyrm
Oh and I forgot.

4. the list and list headings take a little while to update. If I leave one part of the VFS and enter another part, the view still shows the previous widget list until they have a chance to update. Is there anyway to hide it until the list has had a chance to update? I’m not adverse to showing a busy spinner until it updates, but getting it to space correctly seems to require a large does of magic.

Wyrm
@mardukL , hey sport mostly your help has got me this far, do you have any suggestions on sorting issues in previous messages?

Wyrm
not sure if this would be like home.xml layout you may need     <pagecontrol></pagecontrol>


xml:

    <control type="group" id="5000">
                    <visible>String.IsEqual(Container(9000).ListItem.Property(widget),MoviesWidget)</visible>
                    <include content="Visible_Right_Delayed_Home">
                        <param name="id" value="MoviesWidget"/>
                    </include>
                    <control type="grouplist" id="5001">
                        <include>WidgetGroupListCommon</include>
                        <pagecontrol>5010</pagecontrol>
                        <include content="WidgetListCategories" condition="Library.HasContent(movies) + !Skin.HasSetting(hide_moviescategory)">
                            <param name="content_path" value="library://video/movies/"/>
                            <param name="additional_movie_items" value="true"/>
                            <param name="widget_header" value="$LOCALIZE[31148]"/>
                            <param name="widget_target" value="videos"/>
                            <param name="list_id" value="5900"/>
                        </include>
@the_other_guy ,

thanks for your reply. Certainly not the stupidest idea I have tried so gave it a go, unfortunately did not help. I had also thought it might relate to an number of bugs that have been fixed in the upcoming 19.4 version, so tried one of the nightlies also with no improvement. Well there was a very minor improvement, I now occasionally get crash files which I was not even getting before. View as listed works fine for my video library (TV shows in particular, where the view makes sense), using the same view on the Netflix addon results in a hard crash of Kodi. I’m away on holiday with the family for the next week, will touch base with the addon author when I return and see if he has any ideas on what I am doing to cause the crash.

thanks for taking the time to reply.

Wyrm