Need Some Help With Editing Estuary - CadmarLegend - 2023-12-28
Heya. I’m asking for some help regarding Estuary’s xml because I wish to edit the side panel a little for my personal use. I have experienced working as a coder, but am new to the Kodi skinning engine. I have a question about a property . Without further ado:
xml/home.xml
xml: <item>
<label>TV Shows</label>
<onclick condition="Library.HasContent(tvshows) + Skin.HasSetting(home_no_categories_widget) + !System.GetBool(myvideos.flatten)">ActivateWindow(Videos,videodb://tvshows/,return)</onclick>
<onclick condition="Library.HasContent(tvshows) + Skin.HasSetting(home_no_categories_widget) + System.GetBool(myvideos.flatten)">ActivateWindow(Videos,videodb://tvshows/titles/,return)</onclick>
<onclick condition="Library.HasContent(tvshows) + !Skin.HasSetting(home_no_categories_widget)">ActivateWindow(Videos,videodb://tvshows/titles/,return)</onclick>
<onclick condition="!Library.HasContent(tvshows)">ActivateWindow(Videos,sources://video/,return)</onclick>
<property name="menu_id">$NUMBER[6000]</property>
<thumb>icons/sidemenu/tv.png</thumb>
<property name="id">tvshows</property>
<visible>!Skin.HasSetting(HomeMenuNoTVShowButton)</visible>
</item>
As you can see, I have edited out the Localization in the label. I wish to make another navigation button titled “Anime.” While doing so, however, I came upon a question I needed an answer to. Can the <property name="menu_id">$NUMBER[6000]</property> be any particular numerical value? Should I give this: <property name="id">tvshows</property> an id of “anime”? Or are there only certain allowed values, such as “tvshows”, “movies”, “addons”, “video”, etc.?
this is what I have so far:
xml: <content>
<item>
<label>Movies</label>
<onclick condition="Library.HasContent(movies) + Skin.HasSetting(home_no_categories_widget) + !System.GetBool(myvideos.flatten)">ActivateWindow(Videos,videodb://movies/,return)</onclick>
<onclick condition="Library.HasContent(movies) + Skin.HasSetting(home_no_categories_widget) + System.GetBool(myvideos.flatten)">ActivateWindow(Videos,videodb://movies/titles/,return)</onclick>
<onclick condition="Library.HasContent(movies) + !Skin.HasSetting(home_no_categories_widget)">ActivateWindow(Videos,videodb://movies/titles/,return)</onclick>
<onclick condition="!Library.HasContent(movies)">ActivateWindow(Videos,sources://video/,return)</onclick>
<property name="menu_id">$NUMBER[5000]</property>
<thumb>icons/sidemenu/movies.png</thumb>
<property name="id">movies</property>
<visible>!Skin.HasSetting(HomeMenuNoMovieButton)</visible>
</item>
<item>
<label>TV Shows</label>
<onclick condition="Library.HasContent(tvshows) + Skin.HasSetting(home_no_categories_widget) + !System.GetBool(myvideos.flatten)">ActivateWindow(Videos,videodb://tvshows/,return)</onclick>
<onclick condition="Library.HasContent(tvshows) + Skin.HasSetting(home_no_categories_widget) + System.GetBool(myvideos.flatten)">ActivateWindow(Videos,videodb://tvshows/titles/,return)</onclick>
<onclick condition="Library.HasContent(tvshows) + !Skin.HasSetting(home_no_categories_widget)">ActivateWindow(Videos,videodb://tvshows/titles/,return)</onclick>
<onclick condition="!Library.HasContent(tvshows)">ActivateWindow(Videos,sources://video/,return)</onclick>
<property name="menu_id">$NUMBER[6000]</property>
<thumb>icons/sidemenu/tv.png</thumb>
<property name="id">tvshows</property>
<visible>!Skin.HasSetting(HomeMenuNoTVShowButton)</visible>
</item>
<item>
<label>Anime</label>
<onclick>ActivateWindow(10025,"special://profile/playlists/video/inprogress_movies.xsp",return)</onclick>
<property name="menu_id">$NUMBER[21000]</property>
<thumb>icons/sidemenu/anime.png</thumb>
<property name="id">anime</property>
<visible></visible>
</item>
<item>
<label>Addons</label>
<property name="menu_id">$NUMBER[8000]</property>
<onclick>ActivateWindow(1100)</onclick>
<thumb>icons/sidemenu/addons.png</thumb>
<property name="id">addons</property>
<visible>!Skin.HasSetting(HomeMenuNoProgramsButton)</visible>
</item>
<item>
<label>Videos</label>
<onclick>ActivateWindow(Videos,root)</onclick>
<property name="menu_id">$NUMBER[11000]</property>
<thumb>icons/sidemenu/videos.png</thumb>
<property name="id">video</property>
<visible>!Skin.HasSetting(HomeMenuNoVideosButton)</visible>
</item>
<item>
<label>Weather</label>
<onclick condition="!String.IsEmpty(Weather.Plugin)">ActivateWindow(Weather)</onclick>
<onclick condition="String.IsEmpty(Weather.Plugin)">ReplaceWindow(servicesettings,weather)</onclick>
<property name="menu_id">$NUMBER[15000]</property>
<thumb>icons/sidemenu/weather.png</thumb>
<property name="id">weather</property>
<visible>!Skin.HasSetting(HomeMenuNoWeatherButton)</visible>
</item>
</content>
Thank you.
RE: Need Some Help With Editing Estuary - jjd-uk - 2023-12-29
You can specifiy whatever you want as long as it's unique, for example favoutites use a text id https://github.com/xbmc/xbmc/blob/master/addons/skin.estuary/xml/Home.xml#L1035
In case you're not aware the only purpose to setting that property to tell the Home page what set of widgets to display associated with that main menu item, again using favourites as an example see https://github.com/xbmc/xbmc/blob/master/addons/skin.estuary/xml/Home.xml#L531 where that property is used to show the widgets for favourites.
So with:
Code: <property name="id">anime</property>
So when defining what widgets you want to display the group would begin
Code: <control type="group" id="21000">
<visible>String.IsEqual(Container(9000).ListItem.Property(id),anime)</visible>
RE: Need Some Help With Editing Estuary - CadmarLegend - 2023-12-29
That was very helpful! Thank you!
RE: Need Some Help With Editing Estuary - CadmarLegend - 2023-12-30
Because I have a new question, and because I don’t know if I should make another thread, I’ll just post a reply to this one:
playlists/inprogress_anime.xml
xml: <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<smartplaylist type="movies">
<name>Continue watching</name>
<match>all</match>
<rule field="inprogress" operator="true" />
<rule field="path" operator="contains">
<value>anime</value>
</rule>
<limit>15</limit>
<order direction="descending">lastplayed</order>
</smartplaylist>
Is there a way to have both episodes and movies included in the type ?
Once more, thank you for the help!
RE: Need Some Help With Editing Estuary - CadmarLegend - 2023-12-30
nvm, I just skipped reading a line in the wiki.
Though, I now suppose I must wonder why there is that limiter?
|