Skip to content

Commit

Permalink
[NowPlaying Info] added info action (#957)
Browse files Browse the repository at this point in the history
* [NowPlaying Info] added info button

* Update Includes_OSD.xml

* [Code] improvements

* Update Includes_OSD.xml

* Update Includes_OSD.xml

* [Code] improvements

* Update Includes_NowPlaying.xml

* [Code] improvements

* Update Includes_OSD.xml

* [Code] better matching

* Update Includes_NowPlaying.xml

* Update Custom_NowPlaying_Stop_Helper.xml

* [Code] cleanup

* Revert "[Code] cleanup"

This reverts commit 66c65e1.
  • Loading branch information
beatmasterRS committed Apr 1, 2023
1 parent c6ff44c commit 59ced7a
Show file tree
Hide file tree
Showing 6 changed files with 95 additions and 1 deletion.
2 changes: 1 addition & 1 deletion 1080i/Custom_NowPlaying_Stop_Helper.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<window type="dialog" id="1190">
<visible>!String.IsEmpty(Window(home).Property(controlsvisible)) + Skin.HasSetting(extended.nowplaying) + Window.IsVisible(Home) + !Player.HasMedia + Skin.HasSetting(home.nowplaying.controls)</visible>
<visible>[!String.IsEmpty(Window(home).Property(controlsvisible)) | Control.HasFocus(25)] + Skin.HasSetting(extended.nowplaying) + Window.IsVisible(Home) + !Player.HasMedia + Skin.HasSetting(home.nowplaying.controls)</visible>
<onload>Dialog.Close(all,true)</onload>
<onload>SetFocus(300)</onload>
<onunload>ClearProperty(controlsvisible,home)</onunload>
Expand Down
2 changes: 2 additions & 0 deletions 1080i/DialogMusicInfo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
<onload condition="Control.IsVisible(9201)">SetFocus(9201)</onload>
<onload condition="Control.IsVisible(9001)">SetFocus(9001)</onload>
<onunload>ClearProperty(SetUserRating,home)</onunload>
<onunload condition="!String.IsEmpty(Window(home).Property(shownowplayinginfo))">SetFocus(4000)</onunload>
<onunload condition="!String.IsEmpty(Window(home).Property(shownowplayinginfo))">ClearProperty(shownowplayinginfo,home)</onunload>
<onload>ClearProperty(musicyoutube)</onload>
<onload>ClearProperty(content)</onload>
<onunload>ClearProperty(ShowDisc)</onunload>
Expand Down
2 changes: 2 additions & 0 deletions 1080i/DialogVideoInfo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
<onload>ClearProperty(ShowDisc)</onload>
<onunload>ClearProperty(SetUserRating,home)</onunload>
<onunload>ClearProperty(ShowDisc)</onunload>
<onunload condition="!String.IsEmpty(Window(home).Property(shownowplayinginfo))">SetFocus(4000)</onunload>
<onunload condition="!String.IsEmpty(Window(home).Property(shownowplayinginfo))">ClearProperty(shownowplayinginfo,home)</onunload>
<onload>ClearProperty(content)</onload>
<onload>ClearProperty(down)</onload>
<onload condition="Skin.HasSetting(showartwork.video.tmdbhelper) + !Skin.HasSetting(hidebutton.video.fanart) + !String.IsEmpty(ListItem.Label)">SetProperty(Item_Title,$INFO[ListItem.Label],home)</onload>
Expand Down
8 changes: 8 additions & 0 deletions 1080i/Includes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5058,4 +5058,12 @@
<variable name="AutoCompletionPath">
<value condition="System.AddonIsEnabled(plugin.program.autocompletion)">plugin://plugin.program.autocompletion?info=autocomplete&amp;&amp;id=$INFO[Control.GetLabel(312).index(1)]&amp;&amp;limit=9</value>
</variable>

<variable name="CurrentlyPlayingItem">
<value condition="Player.HasAudio + !String.IsEmpty(MusicPlayer.DBID)">musicdb://songs/?songid=$INFO[MusicPlayer.DBID]</value>
<value condition="Player.HasVideo + VideoPlayer.Content(movies)">videodb://movies/titles/?xsp=%7B%22rules%22%3A%7B%22and%22%3A%5B%7B%22field%22%3A%22title%22%2C%22operator%22%3A%22is%22%2C%22value%22%3A%5B%22$INFO[Player.Title]%22%5D%7D%2C%7B%22field%22%3A%22filename%22%2C%22operator%22%3A%22is%22%2C%22value%22%3A%5B%22$INFO[Player.Filename]%22%5D%7D%5D%7D%2C%22type%22%3A%22movies%22%7D</value>
<value condition="Player.HasVideo + VideoPlayer.Content(episodes)">videodb://tvshows/titles/-1/-1/?xsp=%7B%22rules%22%3A%7B%22and%22%3A%5B%7B%22field%22%3A%22title%22%2C%22operator%22%3A%22is%22%2C%22value%22%3A%5B%22$INFO[Player.Title]%22%5D%7D%2C%7B%22field%22%3A%22filename%22%2C%22operator%22%3A%22is%22%2C%22value%22%3A%5B%22$INFO[Player.Filename]%22%5D%7D%5D%7D%2C%22type%22%3A%22episodes%22%7D
</value>
</variable>

</includes>
66 changes: 66 additions & 0 deletions 1080i/Includes_NowPlaying.xml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,24 @@
<param name="left" value="100" />
<param name="visible" value="$EXP[IsPVRVideo] + !Skin.HasSetting(extended.nowplaying.videowindow)" />
</include>
<control type="list" id="999">
<include>HiddenListControl</include>
<ondown>300</ondown>
<onleft>300</onleft>
<onright>300</onright>
<onup>300</onup>
<onback>300</onback>
<onfocus>SetProperty(shownowplayinginfo,1,home)</onfocus>
<content limit="1">$VAR[CurrentlyPlayingItem]</content>
</control>
<control type="button" id="4000">
<ondown>300</ondown>
<onleft>300</onleft>
<onright>300</onright>
<onup>300</onup>
<onback>300</onback>
<onfocus>SetFocus(25)</onfocus>
</control>
</control>
</include>

Expand Down Expand Up @@ -210,6 +228,20 @@
<width>1100</width>
<include>MultiWidgetsSubLabelDefinition</include>
<label fallback="19055">$VAR[Label_NowPlaying_Time_VideoSubInfo]</label>
<animation type="Visible" reversible="false">
<effect type="fade" end="100" start="0" time="400" delay="300"/>
</animation>
<visible>!Control.HasFocus(25) | [Control.HasFocus(25) + !Container(999).IsUpdating + !Integer.IsGreater(Container(999).NumItems,0)]</visible>
</control>
<control type="label">
<top>55</top>
<width>1100</width>
<include>MultiWidgetsSubLabelDefinition</include>
<label>$LOCALIZE[22081]</label>
<animation type="Hidden" reversible="false">
<effect type="fade" end="0" start="100" time="400" delay="0"/>
</animation>
<visible>Control.HasFocus(25) + !Container(999).IsUpdating + Integer.IsGreater(Container(999).NumItems,0)</visible>
</control>
<animation effect="slide" start="0" end="0,-70" time="150" condition="ControlGroup(777).HasFocus() + Skin.HasSetting(home.nowplaying.controls) + !Skin.HasSetting(home.nowplaying.controls.always.visible)" reversible="false">Conditional</animation>
<animation effect="slide" start="0,-70" end="0,0" delay="300" time="250" tween="sine" easing="out" condition="!ControlGroup(777).HasFocus() + Skin.HasSetting(home.nowplaying.controls) + !Skin.HasSetting(home.nowplaying.controls.always.visible)" reversible="false">Conditional</animation>
Expand All @@ -236,6 +268,20 @@
<width>1100</width>
<include>MultiWidgetsSubLabelDefinition</include>
<label fallback="19055">$VAR[Label_NowPlaying_Time_MusicSubInfo]</label>
<animation type="Visible" reversible="false">
<effect type="fade" end="100" start="0" time="400" delay="300"/>
</animation>
<visible>!Control.HasFocus(25) | [Control.HasFocus(25) + !Container(999).IsUpdating + !Integer.IsGreater(Container(999).NumItems,0)]</visible>
</control>
<control type="label">
<top>55</top>
<width>1100</width>
<include>MultiWidgetsSubLabelDefinition</include>
<label>$LOCALIZE[22081]</label>
<animation type="Hidden" reversible="false">
<effect type="fade" end="0" start="100" time="400" delay="0"/>
</animation>
<visible>Control.HasFocus(25) + !Container(999).IsUpdating + Integer.IsGreater(Container(999).NumItems,0)</visible>
</control>
<animation effect="slide" start="0" end="0,-70" time="150" condition="ControlGroup(777).HasFocus() + Skin.HasSetting(home.nowplaying.controls) + !Skin.HasSetting(home.nowplaying.controls.always.visible)" reversible="false">Conditional</animation>
<animation effect="slide" start="0,-70" end="0,0" delay="300" time="250" tween="sine" easing="out" condition="!ControlGroup(777).HasFocus() + Skin.HasSetting(home.nowplaying.controls) + !Skin.HasSetting(home.nowplaying.controls.always.visible)" reversible="false">Conditional</animation>
Expand Down Expand Up @@ -593,6 +639,15 @@
<texture colordiffuse="BoxWidget" border="4" background="true" infill="false">common/box21.png</texture>
<visible>!Skin.HasSetting(thumbnails.white)</visible>
</control>
<control type="group">
<animation type="Conditional" condition="Control.HasFocus(25)">
<effect type="zoom" start="95" end="100" time="150" tween="sine" easing="inout" center="auto"/>
<effect type="fade" start="0" end="100" time="150" tween="sine" easing="in"/>
</animation>
<include content="def_widgetfocus">
<param name="id" value="25"/>
</include>
</control>
</control>
</definition>
</include>
Expand Down Expand Up @@ -653,6 +708,17 @@
<texture colordiffuse="BoxWidget" border="4" background="true" infill="false">common/box21.png</texture>
<visible>!Skin.HasSetting(thumbnails.white)</visible>
</control>
<control type="group">
<animation type="Conditional" condition="Control.HasFocus(25)">
<effect type="zoom" start="95" end="100" time="150" tween="sine" easing="inout" center="auto"/>
<effect type="fade" start="0" end="100" time="150" tween="sine" easing="in"/>
</animation>
<include content="def_widgetfocus">
<param name="id" value="25"/>
<param name="glow_right" value="2"/>
<param name="glow_left" value="1"/>
</include>
</control>
</control>
</definition>
</include>
Expand Down
16 changes: 16 additions & 0 deletions 1080i/Includes_OSD.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1533,6 +1533,22 @@
</variable>

<include name="OSDControlsHome">
<control type="button" id="25">
<description>Skip Back</description>
<width>48</width>
<height>48</height>
<label/>
<font />
<include>DefControlsHomeUpDown</include>
<texturefocus colordiffuse="$VAR[ColorHighlight]" flipx="true">osd/info.png</texturefocus>
<texturenofocus colordiffuse="Dark2" flipx="true">osd/info.png</texturenofocus>
<onclick condition="!Container(999).IsUpdating + Integer.IsGreater(Container(999).NumItems,0)">SetFocus(999)</onclick>
<onclick condition="!Container(999).IsUpdating + Integer.IsGreater(Container(999).NumItems,0)">Action(info)</onclick>
<oninfo condition="!Container(999).IsUpdating + Integer.IsGreater(Container(999).NumItems,0)">SetFocus(999)</oninfo>
<oninfo condition="!Container(999).IsUpdating + Integer.IsGreater(Container(999).NumItems,0)">Action(info)</oninfo>
<visible allowhiddenfocus="!String.IsEmpty(VideoPlayer.DBID) | !String.IsEmpty(MusicPlayer.DBID)">false</visible>
<!-- !VideoPlayer.Content(livetv) + !Container(999).IsUpdating + Integer.IsGreater(Container(999).NumItems,0) -->
</control>
<control type="button" id="12">
<description>Skip Back</description>
<width>48</width>
Expand Down

0 comments on commit 59ced7a

Please sign in to comment.