Alright, so if anyone is interested. It works, as far as i can see. Maybe some exceptions i haven't tried yet (video files / youtube playlist).
But as concept pretty cool, looks stable. Though if you guys have ideas on how to do this better, it'd be interesting to hear.
What it does atm:
-TvShow now playing popup after 11 sec.
-Movie now playing popup after 1 min 11 sec
-TvShow playlist "up next", 5 min before finish.
DialogSeekBar.xml
Code:
<include>Now_Playing_Popup</include>
Includes.xml
Code:
<include name="Now_Playing_Popup">
<control type="image" id="7657"><!--fake control for visible change animation of popup--->
<!--Substring for tv shows / video under 1 hour-->
<visible>VideoPlayer.Content(episodes) + [SubString(Player.Time,00:11) | SubString(Player.Time,00:12) | SubString(Player.Time,00:13) | SubString(Player.Time,00:14) | SubString(Player.Time,00:15)]</visible>
<posx>10</posx>
<posy>10</posy>
<width>1</width>
<height>1</height>
<texture>blank.png</texture>
</control>
<control type="image" id="7658"><!--fake control for visible change animation of popup--->
<!--Substring for movies / video over 1 hour-->
<visible>VideoPlayer.Content(movies) + [SubString(Player.Time,00:01:11) | SubString(Player.Time,00:01:12) | SubString(Player.Time,00:01:13) | SubString(Player.Time,00:01:14) | SubString(Player.Time,00:01:15)]</visible>
<posx>10</posx>
<posy>10</posy>
<width>1</width>
<height>1</height>
<texture>blank.png</texture>
</control>
<control type="image" id="7659"><!--fake control for visible change animation of popup--->
<!--Substring for playlist up next-->
<visible>!Stringcompare(Playlist.Length,Playlist.Position) + VideoPlayer.Content(episodes) + [SubString(Player.TimeRemaining,05:05) | SubString(Player.TimeRemaining,05:06) | SubString(Player.TimeRemaining,05:07) | SubString(Player.TimeRemaining,05:08) | SubString(Player.TimeRemaining,05:09) | SubString(Player.TimeRemaining,05:10)]</visible>
<posx>10</posx>
<posy>10</posy>
<width>1</width>
<height>1</height>
<texture>blank.png</texture>
</control>
<!--POPUP-->
<control type="group">
<animation effect="fade" start="0" end="100" delay="0" time="300" condition="Control.IsVisible(7657) | Control.IsVisible(7658) | Control.IsVisible(7659)">Conditional</animation>
<animation effect="fade" start="100" end="0" delay="0" time="300" condition="!Control.IsVisible(7657) + !Control.IsVisible(7658) + !Control.IsVisible(7659)">Conditional</animation>
<posx>100</posx>
<posy>0</posy>
<control type="label">
<posy>40</posy>
<width>200</width>
<label>[UPPERCASE]XBMC[/UPPERCASE]</label>
<font>BOLD</font>
<textcolor>white</textcolor>
<align>left</align>
</control>
<control type="label">
<posy>65</posy>
<width>200</width>
<label>[UPPERCASE]NOW WATCHING[/UPPERCASE]</label>
<font>DemiBOLD</font>
<textcolor>white</textcolor>
<align>left</align>
<visible>Control.IsVisible(7657) | Control.IsVisible(7658)</visible>
<animation effect="zoom" start="100" end="0" delay="1200" time="300" condition="Control.IsVisible(7657) | Control.IsVisible(7658)">Conditional</animation>
<animation effect="fade" start="100" end="0" delay="1300" time="300" condition="Control.IsVisible(7657) | Control.IsVisible(7658)">Conditional</animation>
</control>
<control type="label">
<posy>65</posy>
<width>200</width>
<label>[UPPERCASE]UP NEXT[/UPPERCASE]</label>
<font>DemiBOLD</font>
<textcolor>white</textcolor>
<align>left</align>
<visible>Control.IsVisible(7659)</visible>
<animation effect="zoom" start="100" end="0" delay="1200" time="300" condition="Control.IsVisible(7659)">Conditional</animation>
<animation effect="fade" start="100" end="0" delay="1300" time="300" condition="Control.IsVisible(7659)">Conditional</animation>
</control>
<control type="grouplist">
<orientation>horizontal</orientation>
<usecontrolcoords>true</usecontrolcoords>
<posx>0</posx>
<posy>0</posy>
<control type="label">
<posy>65</posy>
<width min="29" max="300">auto</width>
<label>[UPPERCASE]$VAR[Now_Playing_Popup_Text][/UPPERCASE]</label>
<font>DemiBOLD</font>
<textcolor>white</textcolor>
<align>left</align>
<visible>Control.IsVisible(7657) | Control.IsVisible(7658)</visible>
<animation effect="zoom" start="0" end="100" center="auto" delay="1600" time="300" condition="Control.IsVisible(7657) | Control.IsVisible(7658)">Conditional</animation>
<animation effect="fade" start="0" end="100" delay="1700" time="300" condition="Control.IsVisible(7657) | Control.IsVisible(7658)">Conditional</animation>
</control>
<control type="label">
<!--UP NEXT + Episode nr +1--->
<posy>65</posy>
<width min="29" max="300">auto</width>
<label>[UPPERCASE]$VAR[Episode_Plus_One,Episode ,][/UPPERCASE]</label>
<font>DemiBOLD</font>
<textcolor>white</textcolor>
<align>left</align>
<visible>Control.IsVisible(7659)</visible>
<animation effect="zoom" start="0" end="100" center="auto" delay="1600" time="300" condition="Control.IsVisible(7659)">Conditional</animation>
<animation effect="fade" start="0" end="100" delay="1700" time="300" condition="Control.IsVisible(7659)">Conditional</animation>
</control>
<control type="image">
<posx>0</posx>
<posy>20</posy>
<width>320</width>
<height>80</height>
<texture>$VAR[Now_Playing_Popup_Logo]</texture>
<aspectratio aligny="top" scalediffuse="false">keep</aspectratio>
<animation effect="fade" start="0" end="100" delay="1700" time="300" condition="Control.IsVisible(7657) | Control.IsVisible(7658)">Conditional</animation>
</control>
</control>
</control>
</include>
Variables.xml
Code:
<variable name="Now_Playing_Popup_Text">
<value condition="VideoPlayer.Content(movies)">$INFO[VideoPlayer.Title]</value>
<value condition="VideoPlayer.Content(episodes)">$INFO[VideoPlayer.Episode,Episode ,]</value>
</variable>
<variable name="Now_Playing_Popup_Logo">
<value condition="VideoPlayer.Content(movies)">$INFO[Player.Art(clearlogo)]</value>
<value condition="VideoPlayer.Content(episodes)">$INFO[Player.Art(tvshow.clearlogo)]</value>
</variable>
<variable name="Episode_Plus_One">
<value condition="StringCompare(VideoPlayer.Episode,0)">1</value>
<value condition="StringCompare(VideoPlayer.Episode,1)">2</value>
<value condition="StringCompare(VideoPlayer.Episode,2)">3</value>
<value condition="StringCompare(VideoPlayer.Episode,3)">4</value>
<value condition="StringCompare(VideoPlayer.Episode,4)">5</value>
<value condition="StringCompare(VideoPlayer.Episode,5)">6</value>
<value condition="StringCompare(VideoPlayer.Episode,6)">7</value>
<value condition="StringCompare(VideoPlayer.Episode,7)">8</value>
<value condition="StringCompare(VideoPlayer.Episode,8)">9</value>
<value condition="StringCompare(VideoPlayer.Episode,9)">10</value>
<value condition="StringCompare(VideoPlayer.Episode,10)">11</value>
<value condition="StringCompare(VideoPlayer.Episode,11)">12</value>
<value condition="StringCompare(VideoPlayer.Episode,12)">13</value>
<value condition="StringCompare(VideoPlayer.Episode,13)">14</value>
<value condition="StringCompare(VideoPlayer.Episode,14)">15</value>
<value condition="StringCompare(VideoPlayer.Episode,15)">16</value>
<value condition="StringCompare(VideoPlayer.Episode,16)">17</value>
<value condition="StringCompare(VideoPlayer.Episode,17)">18</value>
<value condition="StringCompare(VideoPlayer.Episode,18)">19</value>
<value condition="StringCompare(VideoPlayer.Episode,19)">20</value>
<value condition="StringCompare(VideoPlayer.Episode,20)">21</value>
<value condition="StringCompare(VideoPlayer.Episode,21)">22</value>
<value condition="StringCompare(VideoPlayer.Episode,22)">23</value>
<value condition="StringCompare(VideoPlayer.Episode,23)">24</value>
<value condition="StringCompare(VideoPlayer.Episode,24)">25</value>
<value condition="StringCompare(VideoPlayer.Episode,25)">26</value>
<value condition="StringCompare(VideoPlayer.Episode,26)">27</value>
<value condition="StringCompare(VideoPlayer.Episode,27)">28</value>
<value condition="StringCompare(VideoPlayer.Episode,28)">29</value>
<value condition="StringCompare(VideoPlayer.Episode,29)">30</value>
</variable>
Remember to change the fonts.
And that DialogSeekBar.xml visible conditions might need to be done a little different:
Code:
<window id="115">
<defaultcontrol always="true">901</defaultcontrol>
<allowoverlay>yes</allowoverlay>
<visible>Window.IsActive(2005)</visible>
<controls>
<include>Now_Playing_Popup</include>
<control type="group">
<visible>![Window.IsActive(142) | Window.IsActive(10140) | Window.IsActive(2901)] + [Player.Seeking | Player.DisplayAfterSeek | Player.Paused | Player.Forwarding | Player.Rewinding]</visible>