2013-10-19, 17:56
I need a bit of help,
I am trying to work out how to create a set of list items in an addon and then subsequently show them in a skin. Can anyone help?
Here is an example from the skin:
it's basically the <item id="1" description="Movies"> bits that I want to generate in code and then some how display in the
I think the subtitle addon does somethng similar, and I found:
But I have no idea how to acually pass this to the skin?
I am trying to work out how to create a set of list items in an addon and then subsequently show them in a skin. Can anyone help?
Here is an example from the skin:
Code:
<include name="Plexbmc_Shelf">
<control type="group" description="PLEXBMC">
<control type="label" description="Header">
<visible>Control.IsVisible(311)</visible>
<include>RecentlyAdded_Header</include>
<label>$INFO[Container(311).ListItem.Property(ItemType)]</label>
</control>
<control type="label" description="Label">
<visible>Control.HasFocus(311)</visible>
<include condition="!Skin.HasSetting(VerticalHome)">Horizontal_Label_Commons</include>
<include>RecentlyAdded_Label</include>
<label>$INFO[Container(311).ListItem.Label]</label>
</control>
<control type="fixedlist" id="311" description="Movies PLEXBMC">
<visible>!IsEmpty(Window(Home).Property(Plexbmc.LatestMovie.1.Path))</visible>
<visible>StringCompare(Container(300).ListItem.Property(type),movie)</visible>
<onright>311</onright>
<onup>300</onup>
<onleft condition="Skin.HasSetting(VerticalHome)">300</onleft>
<onleft condition="!Skin.HasSetting(VerticalHome)">311</onleft>
<ondown condition="Control.IsVisible(312)">312</ondown>
<ondown condition="!Control.IsVisible(312)">300</ondown>
<include condition="!Skin.HasSetting(VerticalHome)">Horizontal_Shelf_Commons</include>
<include>RecentlyAdded_Posters</include>
<content>
<item id="1" description="Movies">
<visible>!IsEmpty(Window(Home).Property(Plexbmc.LatestMovie.1.Path))</visible>
<visible>StringCompare(Container(300).ListItem.Property(uuid),Window(Home).Property(Plexbmc.LatestMovie.1.uuid))</visible>
<label>$INFO[Window(Home).Property(Plexbmc.LatestMovie.1.Title)][COLOR=White]$INFO[Window(Home).Property(Plexbmc.LatestMovie.1.Year), • ]$INFO[Window(Home).Property(Plexbmc.LatestMovie.1.Rating), • ]$INFO[Window(Home).Property(Plexbmc.LatestMovie.1.Duration), • , $LOCALIZE[31297]][/COLOR]</label>
<thumb>$INFO[Window(Home).Property(Plexbmc.LatestMovie.1.Thumb)]</thumb>
<property name="ItemType">$LOCALIZE[31961]</property>
<onclick>PlayMedia($ESCINFO[Window(Home).Property(Plexbmc.LatestMovie.1.Path)])</onclick>
</item>
<item id="2" description="Shortcut2">
<visible>!IsEmpty(Window(Home).Property(Plexbmc.LatestMovie.2.Path))</visible>
<visible>StringCompare(Container(300).ListItem.Property(uuid),Window(Home).Property(Plexbmc.LatestMovie.2.uuid))</visible>
<label>$INFO[Window(Home).Property(Plexbmc.LatestMovie.2.Title)][COLOR=White]$INFO[Window(Home).Property(Plexbmc.LatestMovie.2.Year), • ]$INFO[Window(Home).Property(Plexbmc.LatestMovie.2.Rating), • ]$INFO[Window(Home).Property(Plexbmc.LatestMovie.2.Duration), • , $LOCALIZE[31297]][/COLOR]</label>
<thumb>$INFO[Window(Home).Property(Plexbmc.LatestMovie.2.Thumb)]</thumb>
<property name="ItemType">$LOCALIZE[31961]</property>
<onclick>PlayMedia($ESCINFO[Window(Home).Property(Plexbmc.LatestMovie.2.Path)])</onclick>
</item>
<item id="3" description="Shortcut3">
<visible>!IsEmpty(Window(Home).Property(Plexbmc.LatestMovie.3.Path))</visible>
<visible>StringCompare(Container(300).ListItem.Property(uuid),Window(Home).Property(Plexbmc.LatestMovie.3.uuid))</visible>
<label>$INFO[Window(Home).Property(Plexbmc.LatestMovie.3.Title)][COLOR=White]$INFO[Window(Home).Property(Plexbmc.LatestMovie.3.Year), • ]$INFO[Window(Home).Property(Plexbmc.LatestMovie.3.Rating), • ]$INFO[Window(Home).Property(Plexbmc.LatestMovie.3.Duration), • , $LOCALIZE[31297]][/COLOR]</label>
<thumb>$INFO[Window(Home).Property(Plexbmc.LatestMovie.3.Thumb)]</thumb>
<property name="ItemType">$LOCALIZE[31961]</property>
<onclick>PlayMedia($ESCINFO[Window(Home).Property(Plexbmc.LatestMovie.3.Path)])</onclick>
</item>
<item id="4" description="Shortcut4">
<visible>!IsEmpty(Window(Home).Property(Plexbmc.LatestMovie.4.Path))</visible>
<visible>StringCompare(Container(300).ListItem.Property(uuid),Window(Home).Property(Plexbmc.LatestMovie.4.uuid))</visible>
<label>$INFO[Window(Home).Property(Plexbmc.LatestMovie.4.Title)][COLOR=White]$INFO[Window(Home).Property(Plexbmc.LatestMovie.4.Year), • ]$INFO[Window(Home).Property(Plexbmc.LatestMovie.4.Rating), • ]$INFO[Window(Home).Property(Plexbmc.LatestMovie.4.Duration), • , $LOCALIZE[31297]][/COLOR]</label>
<thumb>$INFO[Window(Home).Property(Plexbmc.LatestMovie.4.Thumb)]</thumb>
<property name="ItemType">$LOCALIZE[31961]</property>
<onclick>PlayMedia($ESCINFO[Window(Home).Property(Plexbmc.LatestMovie.4.Path)])</onclick>
</item>
it's basically the <item id="1" description="Movies"> bits that I want to generate in code and then some how display in the
I think the subtitle addon does somethng similar, and I found:
Code:
listitem = xbmcgui.ListItem(label=_( languageTranslate(item["language_name"],0,5)),
label2=item["filename"],
iconImage=item["rating"],
thumbnailImage=item["language_flag"]
)
But I have no idea how to acually pass this to the skin?