<?xml version="1.0" encoding="UTF-8"?>
<window>
	<defaultcontrol always="true">9000</defaultcontrol>
	<onload condition="String.IsEmpty(ListItem.Label)">Action(back)</onload>
	<onload>ClearProperty(pvrinfo)</onload>
	<controls>

		<control type="group" id="9001">
			<defaultcontrol>9002</defaultcontrol>
			<top>50</top>
			<visible>$EXP[InfoDialogsCondition] + !String.IsEmpty(ListItem.Label)</visible>
			<include>InfoDialogs_OpenCloseAnimation</include>
			<control type="group">
				<left>45</left>
				<top>115</top>
				<include content="InfoDialogsThumb">
					<param name="aspectratio" value="keep"/>
					<param name="fallback" value="thumbs/fallback_livetv.png"/>
				</include>
				<include content="InfoDialogsHeadTitle">
					<param name="left" value="276"/>
					<param name="width" value="910"/>
					<param name="visible" value="String.IsEmpty(Window.Property(pvrinfo))"/>
				</include>
			</control>

			<!-- Sub Labels -->
			<control type="group">
				<left>320</left>
				<top>115</top>
				<visible>String.IsEmpty(Window.Property(pvrinfo))</visible>
				<include content="VideoInfoSeperator">
					<param name="top" value="40"/>
					<param name="width" value="910"/>
				</include>
				<!-- Left Part -->
				<control type="grouplist">
					<left>2</left>
					<top>52</top>
					<itemgap>10</itemgap>
					<orientation>horizontal</orientation>
					<control type="image">
						<width>56</width>
						<height>24</height>
						<texture colordiffuse="viewsinfo">$VAR[MPAATVRating]</texture>
						<visible>!String.IsEmpty(ListItem.MPAA)</visible>
					</control>
					<include content="VideoInfoLabel">
						<param name="height" value="24"/>
						<param name="label" value=" |"/>
						<param name="visible" value="!String.IsEmpty(ListItem.MPAA)"/>
					</include>
					<include content="VideoInfoLabel">
						<param name="max_width" value="530"/>
						<param name="height" value="24"/>
						<param name="label" value="$VAR[InfoDialogsLeftSubLabel]"/>
					</include>
				</control>

				<!-- Right Part -->
				<control type="grouplist">
					<right>52</right>
					<top>52</top>
					<align>right</align>
					<itemgap>10</itemgap>
					<orientation>horizontal</orientation>
					<include content="VideoInfoLabel">
						<param name="max_width" value="300"/>
						<param name="height" value="24"/>
						<param name="label" value="$INFO[ListItem.StartTime(hh:mm),]$INFO[ListItem.EndTime(hh:mm), - ]$VAR[ListItemDurationVar,  |  ]"/>
					</include>
					<control type="image">
						<width>22</width>
						<height>22</height>
						<texture colordiffuse="viewsinfo">icons/time.png</texture>
					</control>
				</control>
				<include content="VideoInfoSeperator">
					<param name="top" value="86"/>
					<param name="width" value="910"/>
					<param name="visible" value=""/>
				</include>
			</control>

			<control type="group" id="9003">
				<defaultcontrol>44</defaultcontrol>
				<visible>String.IsEmpty(Window.Property(pvrinfo))</visible>
				<!-- Labels -->
				<control type="group">
					<left>320</left>
					<top>245</top>
					<control type="grouplist">
						<left>0</left>
						<top>-25</top>
						<itemgap>10</itemgap>
						<!-- 1st label -->
						<include content="VideoInfoLabel">
							<param name="label" value="$VAR[ChannelNameLabel]"/>
							<param name="max_width" value="910"/>
							<param name="visible" value="!Window.IsVisible(PVRRecordingInfo)"/>
						</include>
						<!-- 2nd label -->
						<include content="VideoInfoLabel">
							<param name="max_width" value="910"/>
							<param name="label" value="$VAR[SeasonEpisodeLabel]"/>
							<param name="visible" value=""/>
						</include>
						<include content="VideoInfoLabel">
							<param name="max_width" value="910"/>
							<param name="label" value="$VAR[VideoInfoDirectorLabel,,	]$VAR[VideoInfoWriterLabel]"/>
							<param name="visible" value="Window.IsVisible(PVRRecordingInfo) + !String.IsEmpty(ListItem.Writer)"/>
						</include>
						<include content="VideoInfoLabel">
							<param name="max_width" value="910"/>
							<param name="label" value="$VAR[VideoInfoDirectorLabel]"/>
							<param name="visible" value="Window.IsVisible(PVRRecordingInfo) + String.IsEmpty(ListItem.Writer)"/>
						</include>
						<!-- 3rd label -->
						<include content="VideoInfoLabel">
							<param name="max_width" value="910"/>
							<param name="label" value="$VAR[DateLabel]"/>
							<param name="visible" value=""/>
						</include>
					</control>
					<include content="VideoInfoSeperator">
						<param name="top" value="73"/>
						<param name="width" value="910"/>
						<param name="visible" value=""/>
					</include>
					<!--
					<control type="videowindow">
						<left>605</left>
						<top>-25</top>
						<width>300</width>
						<height>170</height>
					</control>
					-->
				</control>
				<!-- Plot -->
				<control type="group">
					<left>320</left>
					<top>322</top>
					<width>650</width>
					<include content="InfoDialogsDescription">
						<param name="textbox_top" value="5"/>
						<param name="textbox_width" value="910"/>
						<param name="textbox_height" value="175"/>
						<param name="font" value="TextboxFont_22"/>
						<param name="onup" value="9000"/>
						<param name="onleft" value="9002"/>
						<param name="onright" value="9005"/>
						<param name="button_top" value="-4"/>
						<param name="button_width" value="912"/>
						<param name="button_height" value="196"/>
						<param name="label" value="$INFO[ListItem.Plot]"/>
						<param name="visible" value=""/>
					</include>
					<include content="VideoInfoSeperator">
						<param name="top" value="191"/>
						<param name="width" value="910"/>
						<param name="visible" value=""/>
					</include>
				</control>
			</control>

			<!-- Similar/Timer/Videos Buttons -->
			<control type="grouplist" id="9002">
				<left>45</left>
				<top>380</top>
				<onleft>9000</onleft>
				<onright condition="String.IsEqual(Window.Property(pvrinfo),1)">9004</onright>
				<onright condition="String.IsEmpty(Window.Property(pvrinfo))">9003</onright>
				<onup>9000</onup>
				<itemgap>8</itemgap>
				<control type="button" id="84">
					<description>Similar</description>
					<width>256</width>
					<include>InfoDialogsButton</include>
					<label>$LOCALIZE[31356]</label>
					<oninfo>PreviousMenu</oninfo>
					<onclick>SendClick(4)</onclick>
					<enable>Control.IsVisible(4) + Window.IsVisible(PVRGuideInfo)</enable>
					<animation effect="fade" start="100" end="60" condition="!Control.IsVisible(4)" reversible="true">Conditional</animation>
					<animation effect="fade" start="100" end="60" condition="![Window.IsVisible(PVRRecordingInfo) | Window.IsVisible(PVRGuideInfo)]" reversible="true">Conditional</animation>
				</control>
				<control type="button" id="85">
					<description>Timer</description>
					<width>256</width>
					<include>InfoDialogsButton</include>
					<label>$LOCALIZE[31357]</label>
					<oninfo>PreviousMenu</oninfo>
					<onclick>SendClick(9)</onclick>
					<enable>Control.IsVisible(9) + Window.IsVisible(PVRGuideInfo)</enable>
					<animation effect="fade" start="100" end="60" condition="!Control.IsVisible(9)" reversible="true">Conditional</animation>
					<animation effect="fade" start="100" end="60" condition="!Window.IsVisible(PVRGuideInfo)" reversible="true">Conditional</animation>
				</control>
				<control type="togglebutton" id="80">
					<description>YouTube</description>
					<width>256</width>
					<include>InfoDialogsButton</include>
					<label>YouTube</label>
					<altlabel>$LOCALIZE[29915]</altlabel>
					<usealttexture>String.IsEqual(Window.Property(pvrinfo),1) + !String.IsEmpty(Window.Property(pvrinfo))</usealttexture>
					<onclick>SetProperty(pvrinfo,1)</onclick>
					<onclick>260</onclick>
					<altclick>ClearProperty(pvrinfo)</altclick>
				</control>
			</control>
			<control type="grouplist">
				<left>45</left>
				<top>389</top>
				<onup>9000</onup>
				<itemgap>8</itemgap>
				<control type="grouplist">
					<description>Similar</description>
					<align>center</align>
					<height>40</height>
					<width>256</width>
					<orientation>horizontal</orientation>
					<animation effect="fade" start="100" end="50" condition="!Control.HasFocus(84)" reversible="true">Conditional</animation>
					<animation effect="fade" start="100" end="50" condition="!Control.IsVisible(4)" reversible="true">Conditional</animation>
					<animation effect="fade" start="100" end="50" condition="![Window.IsVisible(PVRRecordingInfo) | Window.IsVisible(PVRGuideInfo)]" reversible="true">Conditional</animation>
					<control type="image">
						<include>InfoDialogsButtonIcon</include>
						<texture>icons/similar.png</texture>
					</control>
					<control type="label">
						<include>InfoDialogsButtonLabel</include>
						<label>$INFO[Control.GetLabel(84)]</label>
					</control>
				</control>
				<control type="grouplist">
					<description>Timer</description>
					<align>center</align>
					<height>40</height>
					<width>256</width>
					<orientation>horizontal</orientation>
					<animation effect="fade" start="100" end="50" condition="!Control.HasFocus(85)" reversible="true">Conditional</animation>
					<animation effect="fade" start="100" end="50" condition="!Control.IsVisible(9)" reversible="true">Conditional</animation>
					<animation effect="fade" start="100" end="50" condition="!Window.IsVisible(PVRGuideInfo)" reversible="true">Conditional</animation>
					<control type="image">
						<height>26</height>
						<width>26</width>
						<texture>windows/pvr/timer_epg.png</texture>
					</control>
					<control type="label">
						<height>26</height>
						<include>InfoDialogsButtonLabel</include>
						<label>$INFO[Control.GetLabel(85)]</label>
					</control>
				</control>
				<control type="grouplist">
					<description>YouTube</description>
					<align>center</align>
					<height>40</height>
					<width>256</width>
					<orientation>horizontal</orientation>
					<animation effect="fade" start="100" end="50" condition="!Control.HasFocus(80)" reversible="true">Conditional</animation>
					<control type="image">
						<include>InfoDialogsButtonIcon</include>
						<texture>$VAR[ToggleIconYouTubePVR]</texture>
					</control>
					<control type="label">
						<include>InfoDialogsButtonLabel</include>
						<label>$INFO[Control.GetLabel(80)]</label>
					</control>
				</control>
			</control>

			<!-- YouTube -->
			<control type="group" id="9004">
				<left>320</left>
				<top>110</top>
				<control type="group" id="160">
					<defaultcontrol>161</defaultcontrol>
					<width>955</width>
					<height>345</height>
					<visible>String.IsEqual(Window.Property(pvrinfo),1)</visible>
					<include content="InfoDialogsListHeader">
						<param name="container_id" value="161"/>
						<param name="header_icon" value="icons/youtube.png"/>
						<param name="header_label" value="YouTube $LOCALIZE[3]"/>
					</include>
					<include content="InfoDialogsListContainer">
						<param name="container_id" value="161"/>
						<param name="art" value="thumb"/>
						<param name="list_label" value="$INFO[Listitem.Premiered,, | ]$INFO[Listitem.Duration,, | ]$INFO[Listitem.Label]"/>
						<param name="onleft" value="9002"/>
						<param name="onup" value="9000"/>
						<param name="visible" value="Integer.IsGreater(Container(161).NumItems,0) | Container(161).IsUpdating" />
						<param name="custom_click" value="AlarmClock(PlayVideo,PlayMedia($INFO[Container(161).ListItem.FileNameAndPath]),00:01,silent)"/>
						<param name="content" value="$VAR[VideosListContent]"/>
					</include>
				</control>
			</control>
		</control>



		<!-- ================= -->
		<!-- == Top Buttons == -->
		<!-- ================= -->
		<control type="group">
			<left>45</left>
			<top>25</top>
			<include>TextViewerHideAnimations</include>
			<include>InfoDialogs_OpenCloseAnimation</include>
			<visible>!String.IsEmpty(ListItem.Label)</visible>
			<!-- Buttons -->
			<control type="grouplist" id="9000">
				<ondown>9001</ondown>
				<onright condition="String.IsEqual(Window.Property(pvrinfo),1)">9004</onright>
				<onright condition="String.IsEmpty(Window.Property(pvrinfo))">9003</onright>
				<include>InfoDialogs_TopMenuVars</include>
				<control type="label" id="999">
					<include>TopBigLabel</include>
					<label>$LOCALIZE[29915]</label>
				</control>
				<control type="button" id="5">
					<description>Switch to Channel</description>
					<include>TopMenuButton</include>
					<label>$LOCALIZE[19165]</label>
					<oninfo>PreviousMenu</oninfo>
					<visible>Window.IsVisible(PVRGuideInfo)</visible>
				</control>
				<control type="button" id="10">
					<description>Play programme</description>
					<include>TopMenuButton</include>
					<label>$LOCALIZE[19190]</label>
					<oninfo>PreviousMenu</oninfo>
					<visible>Window.IsVisible(PVRGuideInfo)</visible>
				</control>
				<control type="button" id="8">
					<description>Play recording</description>
					<include>TopMenuButton</include>
					<label>$LOCALIZE[19687]</label>
					<oninfo>PreviousMenu</oninfo>
					<visible>Window.IsVisible(PVRRecordingInfo) | Window.IsVisible(PVRGuideInfo)</visible>
				</control>
				<control type="button" id="6">
					<description>Record</description>
					<include>TopMenuButton</include>
					<label/>
					<oninfo>PreviousMenu</oninfo>
					<visible>Window.IsVisible(PVRGuideInfo)</visible>
				</control>
				<control type="button" id="11">
					<description>Set Reminder</description>
					<include>TopMenuButton</include>
					<label>$LOCALIZE[826]</label>
					<visible>Window.IsActive(PVRGuideInfo)</visible>
				</control>
			</control>
			<!-- Content Info -->
			<control type="label">
				<left>2</left>
				<top>45</top>
				<width>300</width>
				<height>20</height>
				<font>FontSize_18</font>
				<textcolor>$VAR[Text.GlobalColor]</textcolor>
				<scroll>false</scroll>
				<align>left</align>
				<aligny>center</aligny>
				<label>$VAR[InfoDialogsContentInfoLabels]</label>
			</control>
		</control>

		<control type="button" id="4">
			<description>Find similar</description>
			<include>HiddenItem</include>
		</control>
		<control type="button" id="9">
			<description>Add timer</description>
			<include>HiddenItem</include>
		</control>

	</controls>
</window>