Skip to content

Commit

Permalink
globalsearch wip
Browse files Browse the repository at this point in the history
  • Loading branch information
realcopacetic committed Apr 29, 2024
1 parent 039e458 commit 0916d6c
Show file tree
Hide file tree
Showing 8 changed files with 45 additions and 43 deletions.
36 changes: 0 additions & 36 deletions 16x9/Components_Viewtypes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -99,42 +99,6 @@
</control>
</include>

<include name="Media_Cacher">
<control type="grouplist">
<include content="Hidden_Control" />
<control type="image">
<width>1</width>
<height>1</height>
<texture>$INFO[ListItem.Art(clearlogo)]</texture>
</control>
<control type="image">
<width>1</width>
<height>1</height>
<texture>$INFO[ListItem.Art(clearlogo-alt)]</texture>
</control>
<control type="image">
<width>1</width>
<height>1</height>
<texture>$INFO[ListItem.Art(clearlogo-billboard)]</texture>
</control>
<control type="image">
<width>1</width>
<height>1</height>
<texture>$INFO[Container(3100).ListItem.Art(clearlogo)]</texture>
</control>
<control type="image">
<width>1</width>
<height>1</height>
<texture>$INFO[Container(3100).ListItem.Art(clearlogo-alt)]</texture>
</control>
<control type="image">
<width>1</width>
<height>1</height>
<texture>$INFO[Container(3100).ListItem.Art(clearlogo-billboard)]</texture>
</control>
</control>
</include>

<include name="Custom_List">
<param name="type" default="fixedlist" />
<param name="id" />
Expand Down
2 changes: 2 additions & 0 deletions 16x9/Custom_1180_globalsearch.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<defaultcontrol always="true">3000</defaultcontrol>
<controls>

<!-- Button bouncer until containers are populated -->
<control type="button" id="3000">
<visible allowhiddenfocus="true">false</visible>
<animation effect="slide" end="0,0" time="360" reversible="false">Focus</animation>
Expand All @@ -30,6 +31,7 @@
<include content="globalsearch_Widget_3204_Artists" />
<include content="globalsearch_Widget_3205_Albums" />
<include content="globalsearch_Widget_3206_Songs" />
<include content="globalsearch_Scrollbar" />
</control>
</controls>
</window>
2 changes: 0 additions & 2 deletions 16x9/Navigation.xml
Original file line number Diff line number Diff line change
Expand Up @@ -497,13 +497,11 @@
<onfocus condition="!Integer.IsGreater(Container(3201).NumItems,0) + !Integer.IsGreater(Container(3202).NumItems,0) + !Integer.IsGreater(Container(3203).NumItems,0) + Integer.IsGreater(Container(3204).NumItems,0)">SetFocus(3204)</onfocus>
<onfocus condition="!Integer.IsGreater(Container(3201).NumItems,0) + !Integer.IsGreater(Container(3202).NumItems,0) + !Integer.IsGreater(Container(3203).NumItems,0) + !Integer.IsGreater(Container(3204).NumItems,0) + Integer.IsGreater(Container(3205).NumItems,0)">SetFocus(3205)</onfocus>
<onfocus condition="!Integer.IsGreater(Container(3201).NumItems,0) + !Integer.IsGreater(Container(3202).NumItems,0) + !Integer.IsGreater(Container(3203).NumItems,0) + !Integer.IsGreater(Container(3204).NumItems,0) + !Integer.IsGreater(Container(3205).NumItems,0) + Integer.IsGreater(Container(3206).NumItems,0)">SetFocus(3206)</onfocus>
<onfocus condition="!Integer.IsGreater(Container(3201).NumItems,0) + !Integer.IsGreater(Container(3202).NumItems,0) + !Integer.IsGreater(Container(3203).NumItems,0) + !Integer.IsGreater(Container(3204).NumItems,0) + !Integer.IsGreater(Container(3205).NumItems,0) + !Integer.IsGreater(Container(3206).NumItems,0) + Integer.IsGreater(Container(3207).NumItems,0)">SetFocus(3207)</onfocus>
<onfocus condition="!Integer.IsGreater(Container(3201).NumItems,0) + !Integer.IsGreater(Container(3202).NumItems,0) + !Integer.IsGreater(Container(3203).NumItems,0) + !Integer.IsGreater(Container(3204).NumItems,0) + !Integer.IsGreater(Container(3205).NumItems,0) + !Integer.IsGreater(Container(3206).NumItems,0) + !Integer.IsGreater(Container(3207).NumItems,0)">SetFocus($PARAM[bounce_id])</onfocus>
</definition>
</include>

<include name="globalsearch_Navigation">
<onback>SetFocus(3000)</onback>
<onleft condition="!Container.HasNext">0</onleft>
<onright condition="!Container.HasPrevious">0</onright>
<ondown condition="Control.HasFocus(3201) + Integer.IsGreater(Container(3202).NumItems,0)">3202</ondown>
Expand Down
29 changes: 29 additions & 0 deletions 16x9/Scrollbars.xml
Original file line number Diff line number Diff line change
Expand Up @@ -650,6 +650,35 @@
</include>
</include>

<include name="globalsearch_Scrollbar">
<include content="Widget_Scrollbar_Template">
<param name="visible" value="!$EXP[TransparentDialog_IsVisible]" />
<param name="background_color" value="$VAR[Home_Scroll_Widget_Background_Color]" />
<param name="focused_color" value="$VAR[Home_Scroll_Widget_Focused_Color]" />
<param name="pos0_enabled" value="true" />
<param name="pos0_visible" value="Integer.IsGreater(Container(3201).NumItems,0)" />
<param name="pos0_active" value="Control.HasFocus(3201)" />
<param name="pos1_enabled" value="true" />
<param name="pos1_visible" value="Integer.IsGreater(Container(3202).NumItems,0)" />
<param name="pos1_active" value="Control.HasFocus(3202)" />
<param name="pos2_enabled" value="true" />
<param name="pos2_visible" value="Integer.IsGreater(Container(3203).NumItems,0)" />
<param name="pos2_active" value="Control.HasFocus(3203)" />
<param name="pos3_enabled" value="true" />
<param name="pos3_visible" value="Integer.IsGreater(Container(3204).NumItems,0)" />
<param name="pos3_active" value="Control.HasFocus(3204)" />
<param name="pos4_enabled" value="true" />
<param name="pos4_visible" value="Integer.IsGreater(Container(3205).NumItems,0)" />
<param name="pos4_active" value="Control.HasFocus(3205)" />
<param name="pos5_enabled" value="true" />
<param name="pos5_visible" value="Integer.IsGreater(Container(3206).NumItems,0)" />
<param name="pos5_active" value="Control.HasFocus(3206)" />
<param name="pos6_enabled" value="true" />
<param name="pos6_visible" value="Integer.IsGreater(Container(3207).NumItems,0)" />
<param name="pos6_active" value="Control.HasFocus(3207)" />
</include>
</include>

<include name="DialogAddonInfo_Scrollbar">
<include content="Widget_Scrollbar_Template">
<param name="visible" value="!Window.IsVisible(shutdownmenu) + Control.IsVisible(50)" />
Expand Down
7 changes: 3 additions & 4 deletions 16x9/Templates_Widgets.xml
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@

<include name="Home_Widgets">
<control type="group">
<visible>!$EXP[Infoscreen_IsVisible] + !Control.HasFocus(4010)</visible>
<visible>!$EXP[Infoscreen_IsVisible] + !Control.HasFocus(4010) + !$EXP[globalsearch_IsVisible]</visible>
<include content="Visible_Fade_Delayed_Animation" />
<include content="Widget_1" condition="!Skin.HasSetting(Widget1_Content_Disabled)" />
<include content="Widget_2" condition="!Skin.HasSetting(Widget2_Content_Disabled)" />
Expand Down Expand Up @@ -709,6 +709,7 @@

<include name="Infoscreen_Widget_3206_StudioCredits">
<include content="Infoscreen_Widget_Template">
<param name="min_items" value="1" />
<param name="widget_view" value="Strip" />
<param name="widget_display" value="Fanart" />
<param name="id" value="3206" />
Expand Down Expand Up @@ -897,7 +898,7 @@
<param name="sortby" value="title" />
<param name="sortorder" value="ascending" />
<param name="content" value="$VAR[Path_globalsearch_Songs]" />
<!--<param name="click_action" value="Open_More_From_Studio" />-->
<param name="click_action" value="Play_All_Songs" />
<param name="limit" value="30" />
<param name="widget_header" value="'$INFO[Skin.String(globalsearch)]'" />
<param name="widget_info" value="$VAR[Copacetic_Divider_Bold] $LOCALIZE[134]" />
Expand All @@ -910,8 +911,6 @@
title, album, artist, genre
-->

</includes>
9 changes: 9 additions & 0 deletions 16x9/Variables_Labels_Media.xml
Original file line number Diff line number Diff line change
Expand Up @@ -866,6 +866,15 @@
<value>$INFO[ListItem.SortLetter]</value>
</variable>

<variable name="Studio_Label">
<!-- Fix for strings breaking in xsp filtered paths when + included in filename - this is for Same Studio widget -->
<value condition="String.Contains(Window(home).Property(StudioSplit.0),Apple TV)">"Apple TV"</value>
<value condition="String.Contains(Window(home).Property(StudioSplit.0),Paramount)">"Paramount"</value>
<value condition="String.Contains(Window(home).Property(StudioSplit.0),Disney)">"Disney"</value>
<value condition="!String.IsEmpty(Window(home).Property(StudioSplit.0)">$ESCINFO[Window(home).Property(StudioSplit.0)]</value>
<value condition="!String.IsEmpty(ListItem.Studio)">$ESCINFO[ListItem.Studio]</value>
</variable>

<variable name="Theme_Label">
<value condition="Skin.String(Theme,Light)">$LOCALIZE[31408]</value>
<value>$LOCALIZE[31407]</value>
Expand Down
2 changes: 1 addition & 1 deletion 16x9/Variables_Paths_Widgets.xml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
</variable>

<variable name="Path_StudioCredits">
<value condition="!String.IsEmpty(Window(home).Property(StudioSplit.0)) + Integer.IsGreater(ListItem.DBID,0) + !String.IsEmpty(ListItem.TVShowTitle)">videodb://tvshows/titles/?xsp=%7B%22rules%22%3A%7B%22and%22%3A%5B%7B%22field%22%3A%22studio%22%2C%22operator%22%3A%22is%22%2C%22value%22%3A%5B$ESCINFO[Window(home).Property(StudioSplit.0)]%5D%7D%2C%7B%22field%22%3A%22title%22%2C%22operator%22%3A%22isnot%22%2C%22value%22%3A%5B$ESCINFO[ListItem.Title]%5D%7D%5D%7D%2C%22type%22%3A%22tvshows%22%7D</value>
<value condition="!String.IsEmpty(Window(home).Property(StudioSplit.0)) + Integer.IsGreater(ListItem.DBID,0) + !String.IsEmpty(ListItem.TVShowTitle)">videodb://tvshows/titles/?xsp=%7B%22rules%22%3A%7B%22and%22%3A%5B%7B%22field%22%3A%22studio%22%2C%22operator%22%3A%22contains%22%2C%22value%22%3A%5B$VAR[Studio_Label]%5D%7D%2C%7B%22field%22%3A%22title%22%2C%22operator%22%3A%22isnot%22%2C%22value%22%3A%5B$ESCINFO[ListItem.Title]%5D%7D%5D%7D%2C%22type%22%3A%22tvshows%22%7D</value>
<value condition="!String.IsEmpty(Window(home).Property(StudioSplit.0)) + Integer.IsGreater(ListItem.DBID,0)">videodb://movies/titles/?xsp=%7B%22rules%22%3A%7B%22and%22%3A%5B%7B%22field%22%3A%22studio%22%2C%22operator%22%3A%22is%22%2C%22value%22%3A%5B$ESCINFO[Window(home).Property(StudioSplit.0)]%5D%7D%2C%7B%22field%22%3A%22title%22%2C%22operator%22%3A%22isnot%22%2C%22value%22%3A%5B$ESCINFO[ListItem.Title]%5D%7D%5D%7D%2C%22type%22%3A%22movies%22%7D</value>
<value condition="!String.IsEmpty(ListItem.Studio) + Integer.IsGreater(ListItem.DBID,0) + !String.IsEmpty(ListItem.TVShowTitle)">videodb://tvshows/titles/?xsp=%7B%22rules%22%3A%7B%22and%22%3A%5B%7B%22field%22%3A%22studio%22%2C%22operator%22%3A%22is%22%2C%22value%22%3A%5B$ESCINFO[ListItem.Studio]%5D%7D%2C%7B%22field%22%3A%22title%22%2C%22operator%22%3A%22isnot%22%2C%22value%22%3A%5B$ESCINFO[ListItem.Title]%5D%7D%5D%7D%2C%22type%22%3A%22tvshows%22%7D</value>
<value condition="!String.IsEmpty(ListItem.Studio) + Integer.IsGreater(ListItem.DBID,0)">videodb://movies/titles/?xsp=%7B%22rules%22%3A%7B%22and%22%3A%5B%7B%22field%22%3A%22studio%22%2C%22operator%22%3A%22is%22%2C%22value%22%3A%5B$ESCINFO[ListItem.Studio]%5D%7D%2C%7B%22field%22%3A%22title%22%2C%22operator%22%3A%22isnot%22%2C%22value%22%3A%5B$ESCINFO[ListItem.Title]%5D%7D%5D%7D%2C%22type%22%3A%22movies%22%7D</value>
Expand Down
1 change: 1 addition & 0 deletions 16x9/Variables_Textures_Artwork_Widgets.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1029,6 +1029,7 @@
<value condition="Control.HasFocus(50) + !String.IsEmpty(Container(50).ListItem(0).Icon)">$INFO[Container(50).ListItem(0).Icon]</value>
<value condition="Control.HasFocus(3203) + !String.IsEmpty(Container(3203).ListItem(0).Icon)">$INFO[Container(3203).ListItem(0).Icon]</value>
<value condition="Control.HasFocus(3204) + !String.IsEmpty(Container(3204).ListItem(0).Art(fanart))">$INFO[Container(3204).ListItem(0).Art(fanart)]</value>
<value condition="Control.HasFocus(3204) + !String.IsEmpty(Container(3204).ListItem(0).Art(thumb))">$INFO[Container(3204).ListItem(0).Art(thumb)]</value>
<value condition="Control.HasFocus(3205) + !String.IsEqual(Container(3205).ListItem(1).DBType,episode) + !String.IsEmpty(Container(3205).ListItem(0).Art(fanart))">$INFO[Container(3205).ListItem(0).Art(fanart)]</value>
<value condition="Control.HasFocus(3205) + !String.IsEmpty(Container(3205).ListItem(0).Icon)">$INFO[Container(3205).ListItem(0).Icon]</value>
<value condition="Control.HasFocus(3206) + !String.IsEqual(Container(3206).ListItem(1).DBType,episode) + !String.IsEmpty(Container(3206).ListItem(0).Art(fanart))">$INFO[Container(3206).ListItem(0).Art(fanart)]</value>
Expand Down

0 comments on commit 0916d6c

Please sign in to comment.