<?xml version="1.0" encoding="UTF-8"?>
<window id="1145" type="dialog">

	<defaultcontrol always="true">6000</defaultcontrol>
    <include>DialogOpenClose</include>
	<onunload condition="Player.Paused">PlayerControl(Play)</onunload>
	<onunload>ClearProperty(PlayerTVShowID,home)</onunload>
	<!-- Needed to auto close the video osd after any settings dialog is closed -->
	<onunload condition="!String.IsEmpty(Window(home).Property(ShowingOSDSettings))">ActivateWindow(1196)</onunload>
	<onunload condition="!String.IsEmpty(Window(home).Property(ShowingOSDSettings))">ClearProperty(ShowingOSDSettings,home)</onunload>

	<controls>

		<control type="button">
		    <description>Hidden button to close the popup when you click outside it</description>
		    <posx>0</posx>
		    <posy>0</posy>
		    <width>1920</width>
		    <height>960</height>
		    <texturenofocus></texturenofocus>
		    <texturefocus></texturefocus>
		    <onclick>Dialog.Close(1145)</onclick>
		</control>

		<control type="button" id="6000">
			<include>HiddenButton</include>
			<onfocus condition="Skin.HasSetting(SeasonsEpisodeList)">SetFocus(6001)</onfocus>
			<onfocus condition="!Skin.HasSetting(SeasonsEpisodeList)">SetFocus(6003)</onfocus>
		</control>

		<control type="group">
			<left>290</left>
			<top>28</top>
			<control type="image" description="Menu BG">
				<width>1040</width>
				<height>820</height>
				<texture border="0,40,0,40">dialogs/DialogBG.png</texture>
				<colordiffuse>$VAR[DialogBGColor]</colordiffuse>
			</control>
			<control type="label">
				<left>0</left>
				<top>32</top>
				<width>1040</width>
				<height>40</height>
				<align>center</align>
				<aligny>center</aligny>
				<textcolor>$VAR[HighlightColor]</textcolor>
				<label>[B]$INFO[VideoPlayer.TVShowTitle][/B] - $INFO[Container(6001).ListItem.Label]</label>
				<visible>Skin.HasSetting(SeasonsEpisodeList)</visible>
			</control>
			<control type="label">
				<left>0</left>
				<top>32</top>
				<width>1040</width>
				<height>40</height>
				<align>center</align>
				<aligny>center</aligny>
				<textcolor>$VAR[HighlightColor]</textcolor>
				<label>[B]$INFO[VideoPlayer.TVShowTitle][/B] - $LOCALIZE[20373] $INFO[VideoPlayer.Season]</label>
				<visible>!Skin.HasSetting(SeasonsEpisodeList)</visible>
			</control>
			<control type="image" description="Line Split">
				<left>30</left>
                <posy>80</posy>
				<width>1000</width>
				<height>1</height>
				<texture>img/LineL.png</texture>
				<aspectratio>stretch</aspectratio>
			</control>

			<control type="group">
			    <visible>Skin.HasSetting(SeasonsEpisodeList)</visible>
				<control type="image">
    	            <posx>20</posx>
		            <posy>105</posy>
		            <height>20</height>
                    <width>20</width>
		            <texture colordiffuse="$VAR[HighlightColor]">arrowleft.png</texture>
			        <visible>Container(6001).HasPrevious</visible>
		        </control>
		        <control type="image">
    	            <posx>995</posx>
		            <posy>105</posy>
		            <height>20</height>
                    <width>20</width>
		            <texture colordiffuse="$VAR[HighlightColor]">arrowright.png</texture>
			        <visible>Container(6001).HasNext</visible>
		        </control>
				<!-- Seasons list -->
		        <control type="list" id="6001">
			        <animation effect="fade" start="100" end="70" condition="!Control.HasFocus(6001)">Conditional</animation>
			        <width>930</width>
			        <height>50</height>
			        <top>90</top>
			        <left>51</left>
			        <orientation>horizontal</orientation>
			        <onup condition="Control.IsVisible(6002)">6002</onup>
			        <ondown condition="Control.IsVisible(6002)">6002</ondown>
					<onup condition="Control.IsVisible(6004)">6004</onup>
			        <ondown condition="Control.IsVisible(6004)">6004</ondown>
			        <onleft>6001</onleft>
			        <onright>6001</onright>
			        <viewtype label="SeasonList">list</viewtype>
			        <itemlayout height="50" width="155">
			            <control type="label" description="Main Label">
			                <height>50</height>
			                <width>155</width>
                            <textoffsetx>16</textoffsetx>
					        <font>ListDetails</font>
			                <label>$INFO[ListItem.Label]</label>
			            </control>
			        </itemlayout>
			        <focusedlayout height="50" width="155">
			            <control type="image">
    			            <posx>0</posx>
				            <posy>0</posy>
				            <height>50</height>
                            <width>155</width>
				            <texture border="4" colordiffuse="$VAR[HighlightColor]">img/WhiteRoundedST2.png</texture>
		                </control>
                        <control type="label" description="Main Label">
			                <height>50</height>
			                <width>155</width>
				            <textoffsetx>16</textoffsetx>
					        <textcolor>$VAR[FocusedTextColor]</textcolor>
				            <selectedcolor>$VAR[FocusedTextColor]</selectedcolor>
				            <shadowcolor></shadowcolor>
                            <font>ListDetails</font>
				            <label>[B]$INFO[ListItem.Label][/B]</label>
			            </control>
			        </focusedlayout>
			        <content target="video" sortby="seasonnumber" sortorder="ascending">videodb://tvshows/titles/$INFO[Window(Home).Property(PlayerTVShowID)]/</content>
		        </control>
		        <control type="image" description="Line Split">
			        <left>30</left>
                    <posy>150</posy>
			        <width>1000</width>
			        <height>1</height>
			        <texture>img/LineL.png</texture>
			        <aspectratio>stretch</aspectratio>
		        </control>
			</control>

			<!-- Episodes list with seasons -->
            <control type="list" id="6002">
				<visible>Skin.HasSetting(SeasonsEpisodeList) + String.IsEqual(Container(6001).ListItem.DBType,season)</visible>
				<animation effect="fade" start="100" end="70" condition="!Control.HasFocus(6002)">Conditional</animation>
				<width>980</width>
				<left>40</left>
				<preloaditems>2</preloaditems>
				<height>600</height>
		        <top>170</top>
		        <onup>6001</onup>
		        <ondown>6001</ondown>
		        <onleft>6001</onleft>
				<onright>61</onright>
				<pagecontrol>61</pagecontrol>
				<scrolltime tween="cubic" easing="out">500</scrolltime>
				<orientation>vertical</orientation>
				<viewtype label="EpisodeList">list</viewtype>
				<itemlayout height="67.5">
					<control type="image">
						<left>-50</left>
						<top>-2</top>
						<width>1000</width>
						<height>67.5</height>
			            <texture flipy="true" border="3">list/ListNF.png</texture>
					</control>
					<control type="label">
						<top>1</top>
						<left>20</left>
						<height>58</height>
						<width>870</width>
						<align>left</align>
						<font>font14</font>
						<shadowcolor></shadowcolor>
						<label>$INFO[ListItem.Label]  ($INFO[ListItem.Premiered])</label>
					</control>
					<control type="image">
			            <left>900</left>
			            <width>30</width>
			            <height>67.5</height>
			            <texture>$VAR[TripleEpisodeOverlay]</texture>
			            <aspectratio aligny="center">keep</aspectratio>
		            </control>
				</itemlayout>
				<focusedlayout height="67.5" condition="!Control.HasFocus(6002)">
				    <control type="image">
						<left>-50</left>
						<top>-2</top>
						<width>1000</width>
						<height>67.5</height>
				        <texture border="4" colordiffuse="$VAR[HighlightColor]">img/WhiteRoundedST2.png</texture>
					</control>
					<control type="label">
						<top>1</top>
						<left>20</left>
						<height>58</height>
						<width>890</width>
						<align>left</align>
						<scroll>true</scroll>
						<label>[B]$INFO[ListItem.Label][/B]  ($INFO[ListItem.Premiered])</label>
						<textcolor>$VAR[FocusedTextColor]</textcolor>
					    <selectedcolor>$VAR[FocusedTextColor]</selectedcolor>
						<font>font14</font>
						<shadowcolor></shadowcolor>
					</control>
					<control type="image">
				        <left>900</left>
				        <width>30</width>
				        <height>67.5</height>
				        <texture>$VAR[TripleEpisodeOverlay]</texture>
				        <aspectratio aligny="center">keep</aspectratio>
			        </control>
				</focusedlayout>
				<focusedlayout height="270" condition="Control.HasFocus(6002)">
					<control type="group">
						<control type="image">
							<top>-0.5</top>
							<width>950</width>
							<height>269.5</height>
							<texture background="true">thumbs/labelback.png</texture>
				            <bordertexture colordiffuse="$VAR[HighlightColor]" border="8">thumbs/IconBorder_FO.png</bordertexture>
				            <bordersize>12,12,20,20</bordersize>
				            <aspectratio align="center" aligny="center">stretch</aspectratio>
						</control>
					</control>
					<control type="group">
						<visible>Control.IsVisible(6002)</visible>
						<top>19</top>
						<left>30</left>
						<include content="ShadowedImage">
				            <param name="top">43</param>
				            <param name="left">-8</param>
				            <param name="width">306</param>
				            <param name="height">174</param>
				            <param name="texture">$VAR[Thumb]</param>
				            <param name="aspect">scale</param>
			            </include>
						<control type="label">
							<top>-18</top>
							<left>-12</left>
							<height>58</height>
							<width>830</width>
							<align>left</align>
							<scroll>true</scroll>
							<label>[B]$INFO[ListItem.Label][/B]  ($INFO[ListItem.Premiered])</label>
							<textcolor>$VAR[HighlightColor]</textcolor>
							<selectedcolor>white</selectedcolor>
							<shadowcolor>black</shadowcolor>
						</control>
						<control type="label">
							<top>24</top>
							<left>317</left>
							<height>58</height>
							<width>785</width>
							<align>left</align>
							<font>ListDetails</font>
							<scroll>true</scroll>
							<label>[B][CAPITALIZE][COLOR=$VAR[HighlightColor]][LOWERCASE]$LOCALIZE[19081]:[/LOWERCASE][/CAPITALIZE][/COLOR][/B] $INFO[ListItem.EndTime]</label>
							<textcolor>white</textcolor>
							<selectedcolor>white</selectedcolor>
							<shadowcolor>black</shadowcolor>
						</control>
						<control type="textbox">
							<left>317</left>
							<top>71</top>
							<width>578</width>
							<height>160</height>
							<align>justify</align>
							<aligny>top</aligny>
							<textcolor>white</textcolor>
							<selectedcolor>black</selectedcolor>
							<label>$VAR[Plots]</label>
						</control>
					</control>
				</focusedlayout>
				<content target="video" sortby="episode" sortorder="ascending">$INFO[Container(6001).ListItem.FolderPath]</content>
			</control>

            <!-- Episodes list when no seasons -->
            <control type="list" id="6003">
				<visible>!Skin.HasSetting(SeasonsEpisodeList)</visible>
				<animation effect="fade" start="100" end="70" condition="!Control.HasFocus(6003)">Conditional</animation>
				<width>980</width>
				<left>40</left>
				<preloaditems>2</preloaditems>
				<height>670</height>
		        <top>100</top>
		        <onup>6003</onup>
		        <ondown>6003</ondown>
				<onright>61</onright>
				<pagecontrol>61</pagecontrol>
				<scrolltime tween="cubic" easing="out">500</scrolltime>
				<orientation>vertical</orientation>
				<viewtype label="EpisodeList">list</viewtype>
				<itemlayout height="67.5">
					<control type="image">
						<left>-50</left>
						<top>-2</top>
						<width>1000</width>
						<height>67.5</height>
			            <texture flipy="true" border="3">list/ListNF.png</texture>
					</control>
					<control type="label">
						<top>1</top>
						<left>20</left>
						<height>58</height>
						<width>870</width>
						<align>left</align>
						<font>font14</font>
						<shadowcolor></shadowcolor>
						<label>$INFO[ListItem.Label]  ($INFO[ListItem.Premiered])</label>
					</control>
					<control type="image">
			            <left>900</left>
			            <width>30</width>
			            <height>67.5</height>
			            <texture>$VAR[TripleEpisodeOverlay]</texture>
			            <aspectratio aligny="center">keep</aspectratio>
		            </control>
				</itemlayout>
				<focusedlayout height="270">
					<control type="group">
						<control type="image">
							<top>-0.5</top>
							<width>950</width>
							<height>269.5</height>
							<texture background="true">thumbs/labelback.png</texture>
				            <bordertexture colordiffuse="$VAR[HighlightColor]" border="8">thumbs/IconBorder_FO.png</bordertexture>
				            <bordersize>12,12,20,20</bordersize>
				            <aspectratio align="center" aligny="center">stretch</aspectratio>
						</control>
					</control>
					<control type="group">
						<top>19</top>
						<left>30</left>
						<include content="ShadowedImage">
				            <param name="top">43</param>
				            <param name="left">-8</param>
				            <param name="width">306</param>
				            <param name="height">174</param>
				            <param name="texture">$VAR[Thumb]</param>
				            <param name="aspect">scale</param>
			            </include>
						<control type="label">
							<top>-18</top>
							<left>-12</left>
							<height>58</height>
							<width>830</width>
							<align>left</align>
							<scroll>true</scroll>
							<label>[B]$INFO[ListItem.Label][/B]  ($INFO[ListItem.Premiered])</label>
							<textcolor>$VAR[HighlightColor]</textcolor>
							<selectedcolor>white</selectedcolor>
							<shadowcolor>black</shadowcolor>
						</control>
						<control type="label">
							<top>24</top>
							<left>317</left>
							<height>58</height>
							<width>785</width>
							<align>left</align>
							<font>ListDetails</font>
							<scroll>true</scroll>
							<label>[B][CAPITALIZE][COLOR=$VAR[HighlightColor]][LOWERCASE]$LOCALIZE[19081]:[/LOWERCASE][/CAPITALIZE][/COLOR][/B] $INFO[ListItem.EndTime]</label>
							<textcolor>white</textcolor>
							<selectedcolor>white</selectedcolor>
							<shadowcolor>black</shadowcolor>
						</control>
						<control type="textbox">
							<left>317</left>
							<top>71</top>
							<width>578</width>
							<height>160</height>
							<align>justify</align>
							<aligny>top</aligny>
							<textcolor>white</textcolor>
							<selectedcolor>black</selectedcolor>
							<label>$VAR[Plots]</label>
						</control>
					</control>
				</focusedlayout>
				<content target="video" sortby="episode" sortorder="ascending">videodb://tvshows/titles/$INFO[Window(Home).Property(PlayerTVShowID)]/$INFO[VideoPlayer.Season]/?tvshowid=$INFO[Window(Home).Property(PlayerTVShowID)]</content>
			</control>

			<!-- Movie info if linked movie to tv series -->
            <control type="grouplist" id="6004">
				<visible>Skin.HasSetting(SeasonsEpisodeList) + String.IsEqual(Container(6001).ListItem.DBType,movie)</visible>
				<width>980</width>
				<left>40</left>
				<height>670</height>
		        <top>100</top>
		        <onup>6004</onup>
		        <ondown>6004</ondown>
				<onright>61</onright>
				<pagecontrol>61</pagecontrol>
				<orientation>vertical</orientation>
				<usecontrolcoords>true</usecontrolcoords>
				<control type="group" id="60041">
					<top>19</top>
					<left>30</left>
					<include content="ShadowedImage">
			            <param name="top">43</param>
			            <param name="left">-8</param>
			            <param name="width">306</param>
			            <param name="height">474</param>
			            <param name="texture">$INFO[Container(6001).ListItem.Art(poster)]</param>
			            <param name="aspect">stretch</param>
		            </include>
					<control type="group">
					    <visible>!Skin.HasSetting(ShowTopRightOverlays)</visible>
					    <control type="image" description="Watched Overlay">
					        <left>265</left>
					        <top>480</top>
					        <width>30</width>
					        <height>30</height>
					        <texture>$VAR[EpisodesListOverlay]</texture>
    				        <colordiffuse>$VAR[MediaWidgetsHighlightColor]</colordiffuse>
					        <aspectratio>keep</aspectratio>
				        </control>
					</control>
					<control type="group">
					    <visible>Skin.HasSetting(ShowTopRightOverlays)</visible>
						<control type="group">
				            <visible>!Container(6001).ListItem.IsResumable</visible>
			                <control type="image">
				                <texture background="true">$VAR[EpisodesListTopRightOverlay]</texture>
				                <posx>220</posx>
				                <posy>44</posy>
				                <height>82</height>
				                <width>82</width>
				                <colordiffuse>$VAR[MediaWidgetsHighlightColor]</colordiffuse>
				                <aspectratio>keep</aspectratio>
			                </control>
						</control>
						<!-- In-Progress overlay -->
				        <control type="group">
				            <visible>Integer.IsGreater(Container(6001).ListItem.PercentPlayed,0) + !Skin.HasSetting(Hide_InProgress_Marks)</visible>
				            <control type="image">
				                <texture background="true" colordiffuse="$VAR[MediaWidgetsHighlightColor]">$VAR[EpisodesListTopRightInProgress]</texture>
				                <posx>92r</posx>
				                <posy>12</posy>
				                <height>72</height>
				                <width>72</width>
			                </control>
			            </control>
				    </control>
					<control type="group">
					    <visible>Skin.HasSetting(ShowRatingOverlays)</visible>
				        <control type="image">
				            <texture background="true" flipx="true">overlays/toprightempty2.png</texture>
				            <posx>-8</posx>
				            <posy>44</posy>
				            <height>90</height>
				            <width>90</width>
					        <colordiffuse>$VAR[HighlightColor]</colordiffuse>
			            </control>
				        <control type="label" description="l2">
					        <posx>2</posx>
				            <posy>52</posy>
					        <height>35</height>
					        <width>35</width>
					        <font>ListDetailsExtraSmall</font>
					        <align>center</align>
					        <shadowcolor></shadowcolor>
					        <label>$VAR[EpisodesListRatingOverlayVar]</label>
					        <textcolor>$VAR[HighlightColor]</textcolor>
				        </control>
					</control>
					<control type="label">
						<left>317</left>
						<top>43</top>
						<height>58</height>
						<width>830</width>
						<align>left</align>
						<scroll>true</scroll>
						<label>[B]$INFO[Container(6001).ListItem.Label][/B]  ($INFO[Container(6001).ListItem.Premiered])</label>
						<textcolor>$VAR[HighlightColor]</textcolor>
						<selectedcolor>white</selectedcolor>
						<shadowcolor>black</shadowcolor>
					</control>
					<control type="label">
						<top>110</top>
						<left>317</left>
						<height>58</height>
						<width>785</width>
						<align>left</align>
						<font>ListDetails</font>
						<scroll>true</scroll>
						<label>[B][CAPITALIZE][COLOR=$VAR[HighlightColor]][LOWERCASE]$LOCALIZE[19081]:[/LOWERCASE][/CAPITALIZE][/COLOR][/B] $INFO[Container(6001).ListItem.EndTime]</label>
						<textcolor>white</textcolor>
						<selectedcolor>white</selectedcolor>
						<shadowcolor>black</shadowcolor>
					</control>
					<control type="textbox">
						<left>317</left>
						<top>171</top>
						<width>578</width>
						<height>360</height>
						<align>justify</align>
						<aligny>top</aligny>
						<textcolor>white</textcolor>
						<selectedcolor>black</selectedcolor>
						<label>$INFO[Container(6001).ListItem.Plot]</label>
					</control>
				</control>
			</control>

			<control type="scrollbar" id="61">
				<left>1012</left>
				<top>32</top>
				<width>30</width>
				<height>760</height>
				<ondown>61</ondown>
				<onup>61</onup>
				<onleft>6002</onleft>
				<onright>6002</onright>
				<texturesliderbackground></texturesliderbackground>
				<texturesliderbar></texturesliderbar>
				<texturesliderbarfocus></texturesliderbarfocus>
				<textureslidernib border="18">OSD/ScrollbarNibNF.png</textureslidernib>
				<textureslidernibfocus border="18" colordiffuse="$VAR[HighlightColor]">OSD/ScrollbarNibFO.png</textureslidernibfocus>
				<showonepage>false</showonepage>
				<orientation>vertical</orientation>
			</control>
		</control>
	</controls>
</window>