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

Commit

Permalink
⚡ Various search fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jurialmunkey committed Mar 25, 2024
1 parent 69c79ea commit ec5b38d
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 12 deletions.
5 changes: 5 additions & 0 deletions 1080i/Includes_Images.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@
<value>special://skin/extras/icons/arrow-down.png</value>
</variable>

<variable name="Image_Search_FilterClear">
<value condition="Skin.HasSetting(Search.EnableDiscover)">special://skin/extras/icons/filter-small.png</value>
<value>special://skin/extras/icons/triangle-exclamation.png</value>
</variable>

<variable name="Image_SkinVariables_FilterName">
<value condition="String.StartsWith(Container(22001).ListItem.Property(sidemenu_guid),guid-)">$INFO[Container(29313).Listitem.Icon]</value>
<value>special://skin/extras/icons/world.png</value>
Expand Down
5 changes: 5 additions & 0 deletions 1080i/Includes_Labels.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@
<value>$LOCALIZE[33063]</value>
</variable>

<variable name="Label_Search_FilterClear">
<value condition="Skin.HasSetting(Search.EnableDiscover)">$LOCALIZE[587]</value>
<value>$LOCALIZE[192]</value>
</variable>

<variable name="Label_SkinVariables_FilterPath">
<value condition="String.IsEqual(Window(Home).Property(Shortcuts.Category),Global)">$LOCALIZE[31313]</value>
<value condition="String.StartsWith(Window(Home).Property(Shortcuts.Category),guid-) + !Container(29303).IsUpdating + !String.IsEmpty(Container(29303).Listitem.Label)">$INFO[Container(29303).Listitem.Label]</value>
Expand Down
2 changes: 0 additions & 2 deletions 1080i/Includes_Lists.xml
Original file line number Diff line number Diff line change
Expand Up @@ -636,8 +636,6 @@
<param name="prefix" />
<definition>
<onfocus condition="$PARAM[condition]">SetProperty(TMDBHelper.WidgetContainer,$INFO[$PARAM[container]ListItem.Property(listid)])</onfocus>
<onfocus condition="$PARAM[condition] + !String.IsEmpty($PARAM[container]ListItem.Property(discover))">SetProperty(Search.EnableDiscover,True)</onfocus>
<onfocus condition="$PARAM[condition] + String.IsEmpty($PARAM[container]ListItem.Property(discover))">ClearProperty(Search.EnableDiscover)</onfocus>
</definition>
</include>
<include name="List_ButtonMenu_Row_HiddenButton_Search">
Expand Down
45 changes: 36 additions & 9 deletions 1080i/Includes_Search_Filter.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,20 +38,47 @@
<label2>$VAR[Label_Setting_SearchStyle]</label2>
<onfocus>ClearProperty(SearchDiscover.FilterLabel)</onfocus>
<onclick>Skin.ToggleSetting(Search.EnableDiscover)</onclick>
<!-- <onclick condition="!Skin.HasSetting(Search.EnableDiscover)">Skin.Reset(Search.LibraryDiscover)</onclick>
<onclick condition="!Skin.HasSetting(Search.EnableDiscover)">Skin.SetBool(Search.EnableDiscover)</onclick>
<onclick condition="Skin.HasSetting(Search.EnableDiscover) + !String.IsEmpty(Container(5099).ListItem.Property(discover))">Skin.SetBool(Search.EnableDiscover)</onclick>
<onclick condition="Skin.HasSetting(Search.EnableDiscover) + !String.IsEmpty(Container(5099).ListItem.Property(discover))">Skin.SetBool(Search.LibraryDiscover)</onclick>
<onclick condition="Skin.HasSetting(Search.EnableDiscover) + String.IsEmpty(Container(5099).ListItem.Property(discover))">Skin.Reset(Search.EnableDiscover)</onclick>
<onclick condition="Skin.HasSetting(Search.EnableDiscover) + String.IsEmpty(Container(5099).ListItem.Property(discover))">Skin.Reset(Search.LibraryDiscover)</onclick> -->
<onclick condition="!Skin.HasSetting(Search.EnableDiscover)">SetProperty(TMDBHelper.WidgetContainer,52)</onclick>
<onclick condition="Skin.HasSetting(Search.EnableDiscover)">SetProperty(TMDBHelper.WidgetContainer,$INFO[Container(5099).ListItem.Property(listid)])</onclick>
<onfocus>SetProperty(TMDBHelper.WidgetContainer,$INFO[Container(5099).ListItem.Property(listid)])</onfocus>
<onunfocus>SetProperty(TMDBHelper.WidgetContainer,$INFO[Container(5099).ListItem.Property(listid)])</onunfocus>
</include>

<include content="Settings_Button">
<include content="Settings_ButtonImage">
<param name="dialog">true</param>
<param name="id">9501</param>
<param name="groupid">9601</param>
<param name="control">button</param>
<label>$LOCALIZE[587]</label>
<onclick>SetFocus(8000)</onclick>
<param name="icon">$VAR[Image_Search_FilterClear]</param>
<label>$VAR[Label_Search_FilterClear]</label>

<onclick>SetProperty(TMDBHelper.WidgetContainer,$INFO[Container(5099).ListItem.Property(listid)])</onclick>
<onfocus>SetProperty(TMDBHelper.WidgetContainer,$INFO[Container(5099).ListItem.Property(listid)])</onfocus>
<onunfocus>SetProperty(TMDBHelper.WidgetContainer,$INFO[Container(5099).ListItem.Property(listid)])</onunfocus>

<onclick condition="Skin.HasSetting(Search.EnableDiscover)">SetFocus(8000)</onclick>

<onclick condition="!Skin.HasSetting(Search.EnableDiscover)">SetFocus(9099)</onclick>
<onclick condition="!Skin.HasSetting(Search.EnableDiscover)">RunScript(script.skinvariables,set_editcontrol=9099,window_id=1105,setfocus=9099)</onclick>
<onclick condition="!Skin.HasSetting(Search.EnableDiscover)">ClearProperty(SearchTerm)</onclick>
<onclick condition="!Skin.HasSetting(Search.EnableDiscover)">ClearProperty(SearchDiscover.SortLabel)</onclick>
<onclick condition="!Skin.HasSetting(Search.EnableDiscover)">ClearProperty(SearchDiscover.FilmSort)</onclick>
<onclick condition="!Skin.HasSetting(Search.EnableDiscover)">ClearProperty(SearchDiscover.ShowSort)</onclick>
<onclick condition="!Skin.HasSetting(Search.EnableDiscover)">ClearProperty(SearchDiscover.GenreLabel)</onclick>
<onclick condition="!Skin.HasSetting(Search.EnableDiscover)">ClearProperty(SearchDiscover.GenreID)</onclick>
<onclick condition="!Skin.HasSetting(Search.EnableDiscover)">ClearProperty(SearchDiscover.ProviderLabel)</onclick>
<onclick condition="!Skin.HasSetting(Search.EnableDiscover)">ClearProperty(SearchDiscover.ProviderID)</onclick>
<onclick condition="!Skin.HasSetting(Search.EnableDiscover)">ClearProperty(SearchDiscover.PeopleLabel)</onclick>
<onclick condition="!Skin.HasSetting(Search.EnableDiscover)">ClearProperty(SearchDiscover.PeopleID)</onclick>
<onclick condition="!Skin.HasSetting(Search.EnableDiscover)">ClearProperty(SearchDiscover.YearHigh)</onclick>
<onclick condition="!Skin.HasSetting(Search.EnableDiscover)">ClearProperty(SearchDiscover.YearLow)</onclick>
<onclick condition="!Skin.HasSetting(Search.EnableDiscover)">ClearProperty(SearchDiscover.RatingLow)</onclick>
<onclick condition="!Skin.HasSetting(Search.EnableDiscover)">ClearProperty(SearchDiscover.StudioLabel)</onclick>
<onclick condition="!Skin.HasSetting(Search.EnableDiscover)">ClearProperty(SearchDiscover.DirectorLabel)</onclick>
<onclick condition="!Skin.HasSetting(Search.EnableDiscover)">ClearProperty(SearchDiscover.SortBy)</onclick>
<onclick condition="!Skin.HasSetting(Search.EnableDiscover)">ClearProperty(SearchDiscover.SortOrder)</onclick>
<onclick condition="!Skin.HasSetting(Search.EnableDiscover)">Skin.Reset(SearchDiscover.VoteLow)</onclick>
<onclick condition="!Skin.HasSetting(Search.EnableDiscover)">Skin.Reset(SearchDiscover.ItemLimit)</onclick>
</include>

</include>
Expand Down
2 changes: 1 addition & 1 deletion 1080i/Includes_Settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@
<visible>Control.IsVisible($PARAM[buttonid])</visible>
<control type="group">
<centertop>50%</centertop>
<right>30</right>
<right>40</right>
<width>40</width>
<height>40</height>
<control type="image">
Expand Down

0 comments on commit ec5b38d

Please sign in to comment.