Skip to content
This repository has been archived by the owner on Oct 9, 2024. It is now read-only.

Commit

Permalink
✨ Add custom user hubs
Browse files Browse the repository at this point in the history
  • Loading branch information
jurialmunkey committed Jan 1, 2023
1 parent b289356 commit 043aa8a
Show file tree
Hide file tree
Showing 8 changed files with 240 additions and 7 deletions.
21 changes: 21 additions & 0 deletions 1080i/Custom_1132_Hub_User.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<window type="window" id="1132">
<defaultcontrol>4900</defaultcontrol>
<controls>
<include>Defs_TMDbHelper_Loader</include>
<include>Background_ExtraFanart</include>
<include>Background_Main</include>

<include>skinshortcuts-template-hub-widgets</include>

<include>Hub_Furniture</include>

<control type="group">
<visible>!$EXP[Exp_InfoDialogs]</visible>
<include content="Furniture_Top_Left">
<param name="label">$INFO[Window(Home).Property(CustomHubHeader)]</param>
</include>
</control>

</controls>
</window>
2 changes: 1 addition & 1 deletion 1080i/Home.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<onload>SetProperty(TMDbHelper.WidgetContainer,301)</onload>
<onunload>ClearProperty(MenuSelect,Home)</onunload>
<onunload>ClearProperty(AnimationDirection,Home)</onunload>
<onload>RunScript(script.skinshortcuts,type=buildxml&amp;mainmenuID=300&amp;levels=1&amp;group=mainmenu|powermenu|searchmenu)</onload>
<onload>RunScript(script.skinshortcuts,type=buildxml&amp;mainmenuID=300&amp;levels=2&amp;group=mainmenu|powermenu|searchmenu)</onload>
<onload condition="Control.HasFocus(301) + !String.IsEmpty(Window(Home).Property(FullscreenWidgetRefocus))">SetFocus($INFO[Window(Home).Property(FullscreenWidgetRefocus)])</onload>
<onload condition="Control.HasFocus(301) + String.IsEmpty(Window(Home).Property(FullscreenWidgetRefocus))">SetFocus(300)</onload>
<onload>ClearProperty(FullscreenWidgetRefocus,Home)</onload>
Expand Down
2 changes: 1 addition & 1 deletion 1080i/SkinSettings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<window>
<defaultcontrol always="true">30001</defaultcontrol>
<onload>RunScript(plugin.video.themoviedb.helper,kodi_setting=myvideos.selectaction,property=KodiSetting.DefaultSelectAction)</onload>
<onunload>RunScript(script.skinshortcuts,type=buildxml&amp;mainmenuID=300&amp;levels=1&amp;group=mainmenu|powermenu|searchmenu)</onunload>
<onunload>RunScript(script.skinshortcuts,type=buildxml&amp;mainmenuID=300&amp;levels=2&amp;group=mainmenu|powermenu|searchmenu)</onunload>
<controls>
<include content="Background_Main">
<param name="plain_background">true</param>
Expand Down
63 changes: 59 additions & 4 deletions 1080i/script-skinshortcuts.xml
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@
<param name="id" value="401" />
<param name="control" value="button" />
<description>Choose Shortcut</description>
<visible>!String.EndsWith(Window.Property(groupname),.2)</visible>
<visible>!String.EndsWith(Window.Property(groupname),.1)</visible>
<visible>!String.IsEqual(Window.Property(groupname),searchmenu)</visible>
</include>
Expand All @@ -131,6 +132,16 @@
<visible>String.EndsWith(Window.Property(groupname),.1)</visible>
<include>Action_SkinShortcuts_ContentType_AutoSetOnUnFocus</include>
</include>
<include content="Dialog_Settings_Button">
<param name="id" value="4201" />
<param name="control" value="button" />
<description>Choose Hub Widget Shortcut</description>
<label>$LOCALIZE[31104]</label>
<onclick>SetProperty(custom-grouping,widgethub)</onclick>
<onclick>SendClick(401)</onclick>
<visible>String.EndsWith(Window.Property(groupname),.2)</visible>
<include>Action_SkinShortcuts_ContentType_AutoSetOnUnFocus</include>
</include>
<include content="Dialog_Settings_Button">
<param name="id" value="4101" />
<param name="control" value="button" />
Expand All @@ -152,6 +163,17 @@
<visible>!String.IsEqual(Container(211).ListItem.Property(skinshortcuts-disabled),True)</visible>
<visible>String.EndsWith(Window.Property(groupname),.1)</visible>
</include>
<include content="Dialog_Settings_Button">
<param name="id" value="5307" />
<param name="control" value="button" />
<description>Action Hub</description>
<label>$LOCALIZE[31081]</label>
<onclick>SetProperty(custom-grouping,widgethub)</onclick>
<onclick>SendClick(307)</onclick>
<label2>$INFO[Container(211).ListItem.Property(Path)]</label2>
<visible>!String.IsEqual(Container(211).ListItem.Property(skinshortcuts-disabled),True)</visible>
<visible>String.EndsWith(Window.Property(groupname),.2)</visible>
</include>
<include content="Dialog_Settings_Button">
<param name="id" value="307" />
<param name="control" value="button" />
Expand All @@ -160,6 +182,38 @@
<label2>$INFO[Container(211).ListItem.Property(Path)]</label2>
<visible>!String.IsEqual(Container(211).ListItem.Property(skinshortcuts-disabled),True)</visible>
<visible>!String.EndsWith(Window.Property(groupname),.1)</visible>
<visible>!String.EndsWith(Window.Property(groupname),.2)</visible>
</include>
<include content="Dialog_Settings_Button">
<param name="id" value="9920" />
<param name="control" value="button" />
<description>Hub fullscreen</description>
<label> - $LOCALIZE[31364]</label>
<label2>$INFO[Container(211).ListItem.Property(widgetPath.HubFullscreen)]</label2>
<onclick>SetProperty(widgetID,HubFullscreen)</onclick>
<onclick>SendClick(312)</onclick>
<visible>!String.IsEqual(Container(211).ListItem.Property(skinshortcuts-disabled),True)</visible>
<visible>String.IsEqual(Window.Property(groupname),mainmenu)</visible>
</include>
<include content="Dialog_Settings_Button">
<param name="id" value="9921" />
<param name="control" value="button" />
<description>Hub submenu</description>
<label> - $LOCALIZE[31365]</label>
<label2>$INFO[Container(211).ListItem.Property(widgetPath.HubSubmenu)]</label2>
<onclick>SetProperty(widgetID,HubSubmenu)</onclick>
<onclick>SendClick(312)</onclick>
<visible>!String.IsEqual(Container(211).ListItem.Property(skinshortcuts-disabled),True)</visible>
<visible>String.IsEqual(Window.Property(groupname),mainmenu)</visible>
</include>
<include content="Dialog_Settings_Button">
<param name="id" value="407" />
<param name="control" value="button" />
<description>Hub widgets</description>
<label> - $LOCALIZE[31366]</label>
<visible>!String.IsEqual(Container(211).ListItem.Property(skinshortcuts-disabled),True)</visible>
<visible>String.IsEqual(Window.Property(groupname),mainmenu)</visible>
<visible>String.IsEqual(Container(211).ListItem.Property(Path),ActivateWindow(1132))</visible>
</include>
<include content="Dialog_Settings_Button">
<param name="id" value="305" />
Expand All @@ -176,8 +230,10 @@
<label>$LOCALIZE[31082]</label>
<visible>!String.IsEqual(Container(211).ListItem.Property(skinshortcuts-disabled),True)</visible>
<visible>!String.EndsWith(Window.Property(groupname),.1)</visible>
<visible>!String.EndsWith(Window.Property(groupname),.2)</visible>
<visible>!String.IsEqual(Window.Property(groupname),searchmenu)</visible>
</include>

<include content="Dialog_Settings_Button">
<param name="id" value="405" />
<param name="control" value="button" />
Expand Down Expand Up @@ -227,7 +283,6 @@
</include>



<!-- Widget Options -->
<include content="Dialog_Settings_Button">
<param name="id" value="9901" />
Expand All @@ -245,7 +300,7 @@
<label>$LOCALIZE[31106]</label>
<label2>$INFO[Container(211).ListItem.Property(widgetTarget)]</label2>
<visible>!String.IsEqual(Container(211).ListItem.Property(skinshortcuts-disabled),True)</visible>
<visible>String.EndsWith(Window.Property(groupname),.1) | String.IsEqual(Window.Property(groupname),searchmenu)</visible>
<visible>String.EndsWith(Window.Property(groupname),.2) | String.EndsWith(Window.Property(groupname),.1) | String.IsEqual(Window.Property(groupname),searchmenu)</visible>
<include>Action_SkinShortcuts_ContentType_AutoSetOnFocus</include>
</include>
<include content="Dialog_Settings_Button">
Expand All @@ -255,7 +310,7 @@
<label>$LOCALIZE[31016]</label>
<label2>$INFO[Container(211).ListItem.Property(widgetSortby)]</label2>
<visible>!String.IsEqual(Container(211).ListItem.Property(skinshortcuts-disabled),True)</visible>
<visible>String.EndsWith(Window.Property(groupname),.1) | String.IsEqual(Window.Property(groupname),searchmenu)</visible>
<visible>String.EndsWith(Window.Property(groupname),.2) | String.EndsWith(Window.Property(groupname),.1) | String.IsEqual(Window.Property(groupname),searchmenu)</visible>
</include>
<include content="Dialog_Settings_Button">
<param name="id" value="9904" />
Expand All @@ -264,7 +319,7 @@
<label>$LOCALIZE[580]</label>
<label2>$INFO[Container(211).ListItem.Property(widgetSortorder)]</label2>
<visible>!String.IsEqual(Container(211).ListItem.Property(skinshortcuts-disabled),True)</visible>
<visible>String.EndsWith(Window.Property(groupname),.1) | String.IsEqual(Window.Property(groupname),searchmenu)</visible>
<visible>String.EndsWith(Window.Property(groupname),.2) | String.EndsWith(Window.Property(groupname),.1) | String.IsEqual(Window.Property(groupname),searchmenu)</visible>
</include>
<include content="Dialog_Settings_Button">
<param name="id" value="9905" />
Expand Down
2 changes: 1 addition & 1 deletion addon.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<addon id="skin.arctic.horizon.2" name="Arctic Horizon 2" provider-name="jurialmunkey" version="0.7.20">
<addon id="skin.arctic.horizon.2" name="Arctic Horizon 2" provider-name="jurialmunkey" version="0.7.21">
<requires>
<import addon="xbmc.gui" version="5.15.0" />
<import addon="script.skinshortcuts" version="0.4.0" />
Expand Down
20 changes: 20 additions & 0 deletions language/resource.language.en_gb/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -1829,3 +1829,23 @@ msgstr ""
msgctxt "#31363"
msgid "Media Info Playlist"
msgstr ""

#: /1080i/script-skinshortcuts.xml
msgctxt "#31364"
msgid "Hub fullscreen widget"
msgstr ""

#: /1080i/script-skinshortcuts.xml
msgctxt "#31365"
msgid "Hub submenu node"
msgstr ""

#: /1080i/script-skinshortcuts.xml
msgctxt "#31366"
msgid "Hub widget nodes"
msgstr ""

#: /shortcuts/overrides.xml
msgctxt "#31367"
msgid "Hub - Custom"
msgstr ""
47 changes: 47 additions & 0 deletions shortcuts/overrides.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,15 @@
<action>Reboot()</action>
</override>

<!-- Custom Hub Action -->
<override action="ActivateWindow(1132)">
<action>SetProperty(CustomHubHeader,$INFO[Container(300).ListItem.Label],Home)</action>
<action>SetProperty(submenuVisibility,$INFO[Container(300).ListItem.Property(submenuVisibility)],Home)</action>
<action>ActivateWindow(1132)</action>
</override>

<!-- Additional Common Shortcuts -->
<shortcut label="$LOCALIZE[31367]" type="571" grouping="common" thumbnail="special://skin/extras/icons/gem.png" icon="special://skin/extras/icons/gem.png">ActivateWindow(1132)</shortcut>
<shortcut label="$LOCALIZE[31314]" type="571" grouping="common" thumbnail="special://skin/extras/icons/film.png" icon="special://skin/extras/icons/film.png">ActivateWindow(1120)</shortcut>
<shortcut label="$LOCALIZE[31315]" type="571" grouping="common" thumbnail="special://skin/extras/icons/tv.png" icon="special://skin/extras/icons/tv.png">ActivateWindow(1121)</shortcut>
<shortcut label="$LOCALIZE[31328]" type="571" grouping="common" thumbnail="special://skin/extras/icons/film.png" icon="special://skin/extras/icons/film.png">ActivateWindow(1130)</shortcut>
Expand Down Expand Up @@ -329,6 +337,45 @@
</widget-groupings>


<!-- Widget Grouping -->
<widgethub-groupings>
<node label="$LOCALIZE[24001]">
<node label="$LOCALIZE[1037]">
<content>addon-video</content>
</node>
<node label="$LOCALIZE[1038]">
<content>addon-audio</content>
</node>
<node label="$LOCALIZE[1039]">
<content>addon-image</content>
</node>
</node>
<node label="$LOCALIZE[3]">
<content>video</content>
<node label="$LOCALIZE[1037]">
<content>addon-video</content>
</node>
<node label="$LOCALIZE[31099]">
<content>videosources</content>
</node>
</node>
<node label="$LOCALIZE[2]">
<content>music</content>
<node label="$LOCALIZE[1038]">
<content>addon-audio</content>
</node>
<node label="$LOCALIZE[31100]">
<content>musicsources</content>
</node>
</node>
<node label="$LOCALIZE[31101]">
<content>picturesources</content>
</node>
<node label="$LOCALIZE[1036]">
<content>favourite</content>
</node>
</widgethub-groupings>

<!-- customsearch Grouping -->
<customsearch-groupings>
<node label="32010">
Expand Down
Loading

0 comments on commit 043aa8a

Please sign in to comment.