<?xml version="1.0" encoding="UTF-8"?>
<includes>

	<!-- Custom TV Guide Includes - Uses TMDb Helper Script or Embuary Info Script -->

    <!-- Use landscape if available for thumb, if not, use fanart -->
	<variable name="NextAiredTVGuideArt">
		<value condition="!String.IsEmpty(ListItem.Art(landscape))">$INFO[ListItem.Art(landscape)]</value>
		<value condition="String.IsEmpty(ListItem.Art(landscape))">$INFO[ListItem.Art(fanart)]</value>
	</variable>
    <!-- Content paths for Embuary Info Next Aired.  Ensure that we keep date order based on the weekday -->
	<variable name="EmbInfoNextAired0">
		<value condition="String.IsEqual(Control.GetLabel(11),$LOCALIZE[11])">plugin://script.embuary.info/nextaired/0</value>
		<value condition="String.IsEqual(Control.GetLabel(11),$LOCALIZE[12])">plugin://script.embuary.info/nextaired/1</value>
		<value condition="String.IsEqual(Control.GetLabel(11),$LOCALIZE[13])">plugin://script.embuary.info/nextaired/2</value>
		<value condition="String.IsEqual(Control.GetLabel(11),$LOCALIZE[14])">plugin://script.embuary.info/nextaired/3</value>
		<value condition="String.IsEqual(Control.GetLabel(11),$LOCALIZE[15])">plugin://script.embuary.info/nextaired/4</value>
		<value condition="String.IsEqual(Control.GetLabel(11),$LOCALIZE[16])">plugin://script.embuary.info/nextaired/5</value>
		<value condition="String.IsEqual(Control.GetLabel(11),$LOCALIZE[17])">plugin://script.embuary.info/nextaired/6</value>
	</variable>
	<variable name="EmbInfoNextAired1">
		<value condition="String.IsEqual(Control.GetLabel(11),$LOCALIZE[11])">plugin://script.embuary.info/nextaired/1</value>
		<value condition="String.IsEqual(Control.GetLabel(11),$LOCALIZE[12])">plugin://script.embuary.info/nextaired/2</value>
		<value condition="String.IsEqual(Control.GetLabel(11),$LOCALIZE[13])">plugin://script.embuary.info/nextaired/3</value>
		<value condition="String.IsEqual(Control.GetLabel(11),$LOCALIZE[14])">plugin://script.embuary.info/nextaired/4</value>
		<value condition="String.IsEqual(Control.GetLabel(11),$LOCALIZE[15])">plugin://script.embuary.info/nextaired/5</value>
		<value condition="String.IsEqual(Control.GetLabel(11),$LOCALIZE[16])">plugin://script.embuary.info/nextaired/6</value>
		<value condition="String.IsEqual(Control.GetLabel(11),$LOCALIZE[17])">plugin://script.embuary.info/nextaired/0</value>
	</variable>
	<variable name="EmbInfoNextAired2">
		<value condition="String.IsEqual(Control.GetLabel(11),$LOCALIZE[11])">plugin://script.embuary.info/nextaired/2</value>
		<value condition="String.IsEqual(Control.GetLabel(11),$LOCALIZE[12])">plugin://script.embuary.info/nextaired/3</value>
		<value condition="String.IsEqual(Control.GetLabel(11),$LOCALIZE[13])">plugin://script.embuary.info/nextaired/4</value>
		<value condition="String.IsEqual(Control.GetLabel(11),$LOCALIZE[14])">plugin://script.embuary.info/nextaired/5</value>
		<value condition="String.IsEqual(Control.GetLabel(11),$LOCALIZE[15])">plugin://script.embuary.info/nextaired/6</value>
		<value condition="String.IsEqual(Control.GetLabel(11),$LOCALIZE[16])">plugin://script.embuary.info/nextaired/0</value>
		<value condition="String.IsEqual(Control.GetLabel(11),$LOCALIZE[17])">plugin://script.embuary.info/nextaired/1</value>
	</variable>
	<variable name="EmbInfoNextAired3">
		<value condition="String.IsEqual(Control.GetLabel(11),$LOCALIZE[11])">plugin://script.embuary.info/nextaired/3</value>
		<value condition="String.IsEqual(Control.GetLabel(11),$LOCALIZE[12])">plugin://script.embuary.info/nextaired/4</value>
		<value condition="String.IsEqual(Control.GetLabel(11),$LOCALIZE[13])">plugin://script.embuary.info/nextaired/5</value>
		<value condition="String.IsEqual(Control.GetLabel(11),$LOCALIZE[14])">plugin://script.embuary.info/nextaired/6</value>
		<value condition="String.IsEqual(Control.GetLabel(11),$LOCALIZE[15])">plugin://script.embuary.info/nextaired/0</value>
		<value condition="String.IsEqual(Control.GetLabel(11),$LOCALIZE[16])">plugin://script.embuary.info/nextaired/1</value>
		<value condition="String.IsEqual(Control.GetLabel(11),$LOCALIZE[17])">plugin://script.embuary.info/nextaired/2</value>
	</variable>
	<variable name="EmbInfoNextAired4">
		<value condition="String.IsEqual(Control.GetLabel(11),$LOCALIZE[11])">plugin://script.embuary.info/nextaired/4</value>
		<value condition="String.IsEqual(Control.GetLabel(11),$LOCALIZE[12])">plugin://script.embuary.info/nextaired/5</value>
		<value condition="String.IsEqual(Control.GetLabel(11),$LOCALIZE[13])">plugin://script.embuary.info/nextaired/6</value>
		<value condition="String.IsEqual(Control.GetLabel(11),$LOCALIZE[14])">plugin://script.embuary.info/nextaired/0</value>
		<value condition="String.IsEqual(Control.GetLabel(11),$LOCALIZE[15])">plugin://script.embuary.info/nextaired/1</value>
		<value condition="String.IsEqual(Control.GetLabel(11),$LOCALIZE[16])">plugin://script.embuary.info/nextaired/2</value>
		<value condition="String.IsEqual(Control.GetLabel(11),$LOCALIZE[17])">plugin://script.embuary.info/nextaired/3</value>
	</variable>
	<variable name="EmbInfoNextAired5">
		<value condition="String.IsEqual(Control.GetLabel(11),$LOCALIZE[11])">plugin://script.embuary.info/nextaired/5</value>
		<value condition="String.IsEqual(Control.GetLabel(11),$LOCALIZE[12])">plugin://script.embuary.info/nextaired/6</value>
		<value condition="String.IsEqual(Control.GetLabel(11),$LOCALIZE[13])">plugin://script.embuary.info/nextaired/0</value>
		<value condition="String.IsEqual(Control.GetLabel(11),$LOCALIZE[14])">plugin://script.embuary.info/nextaired/1</value>
		<value condition="String.IsEqual(Control.GetLabel(11),$LOCALIZE[15])">plugin://script.embuary.info/nextaired/2</value>
		<value condition="String.IsEqual(Control.GetLabel(11),$LOCALIZE[16])">plugin://script.embuary.info/nextaired/3</value>
		<value condition="String.IsEqual(Control.GetLabel(11),$LOCALIZE[17])">plugin://script.embuary.info/nextaired/4</value>
	</variable>
	<variable name="EmbInfoNextAired6">
		<value condition="String.IsEqual(Control.GetLabel(11),$LOCALIZE[11])">plugin://script.embuary.info/nextaired/6</value>
		<value condition="String.IsEqual(Control.GetLabel(11),$LOCALIZE[12])">plugin://script.embuary.info/nextaired/0</value>
		<value condition="String.IsEqual(Control.GetLabel(11),$LOCALIZE[13])">plugin://script.embuary.info/nextaired/1</value>
		<value condition="String.IsEqual(Control.GetLabel(11),$LOCALIZE[14])">plugin://script.embuary.info/nextaired/2</value>
		<value condition="String.IsEqual(Control.GetLabel(11),$LOCALIZE[15])">plugin://script.embuary.info/nextaired/3</value>
		<value condition="String.IsEqual(Control.GetLabel(11),$LOCALIZE[16])">plugin://script.embuary.info/nextaired/4</value>
		<value condition="String.IsEqual(Control.GetLabel(11),$LOCALIZE[17])">plugin://script.embuary.info/nextaired/5</value>
	</variable>
    <!-- Left List item for TMDb Helper Next Aired -->
	<include name="TMDbTVGuideItem">
		<param name="TMDbTVGuideItemID" />
		<param name="TMDbTVGuideDayID" />
		<definition>
			<item id="$PARAM[TMDbTVGuideItemID]">
				<label>$INFO[Container($PARAM[TMDbTVGuideDayID]).ListItemAbsolute(0).Property(air_day_short)]$INFO[Container($PARAM[TMDbTVGuideDayID]).NumItems, (,)]</label>
				<label2>$INFO[Container($PARAM[TMDbTVGuideDayID]).ListItemAbsolute(0).Property(air_date_short)]</label2>
				<visible>Integer.IsGreater(Container($PARAM[TMDbTVGuideDayID]).NumItems,0) | Container($PARAM[TMDbTVGuideDayID]).IsUpdating | Container(4000).IsUpdating</visible>
			</item>
		</definition>
	</include>
    <!-- Left List item for Embuary Info Next Aired -->
    <include name="EmbuaryInfoTVGuideItem">
		<param name="EmbuaryInfoTVGuideItemID" />
		<param name="EmbuaryInfoTVGuideDayID" />
		<definition>
			<item id="$PARAM[EmbuaryInfoTVGuideItemID]">
				<label>$INFO[Container($PARAM[EmbuaryInfoTVGuideDayID]).ListItemAbsolute(0).Property(airday)]$INFO[Container($PARAM[EmbuaryInfoTVGuideDayID]).NumItems, (,)]</label>
				<label2>$INFO[Container($PARAM[EmbuaryInfoTVGuideDayID]).ListItemAbsolute(0).Premiered]</label2>
				<visible>Integer.IsGreater(Container($PARAM[EmbuaryInfoTVGuideDayID]).NumItems,0) | Container($PARAM[EmbuaryInfoTVGuideDayID]).IsUpdating | Container(4000).IsUpdating</visible>
			</item>
		</definition>
	</include>
    <!-- Episode Panel layout for TMDb Helper Next Aired -->
	<include name="TMDbTVGuidePanelLayout">
		<left>500</left>
		<top>120</top>
		<width>1341</width>
		<height>910</height>
		<onup>60</onup>
		<ondown>60</ondown>
		<onleft>4000</onleft>
		<orientation>horizontal</orientation>
		<scrolltime tween="quadratic">300</scrolltime>
		<pagecontrol>60</pagecontrol>
		<itemlayout height="840" width="447">
			<control type="image">
				<top>20</top>
				<width>445</width>
				<height>237</height>
				<aspectratio aligny="top">keep</aspectratio>
				<texture background="true">$VAR[NextAiredTVGuideArt]</texture>
			</control>
			<control type="label">
				<top>260</top>
				<width>425</width>
				<height>45</height>
				<label>$INFO[ListItem.TVShowTitle]</label>
				<textoffsetx>15</textoffsetx>
				<font>InfoTitle</font>
				<textcolor>$VAR[HighlightColor]</textcolor>
			</control>
			<control type="label">
				<top>360</top>
				<width>425</width>
				<height>45</height>
				<label>$LOCALIZE[32009]:</label>
				<textoffsetx>15</textoffsetx>
				<font>InfoTitle</font>
				<textcolor>$VAR[HighlightColor]</textcolor>
			</control>
			<control type="label">
				<top>410</top>
				<width>425</width>
				<height>45</height>
				<label>[COLOR $VAR[HighlightColor]]$LOCALIZE[20373]:[/COLOR] [B][COLOR $VAR[LabelTextColor]]$INFO[ListItem.Season][/COLOR][/B]  [COLOR $VAR[HighlightColor]]$LOCALIZE[20359]:[/COLOR] [B][COLOR Grey2]$INFO[ListItem.Episode][/COLOR][/B]</label>
				<textoffsetx>15</textoffsetx>
				<font>InfoPlot</font>
			</control>
			<control type="textbox">
				<left>20</left>
				<top>460</top>
				<width>425</width>
				<height>90</height>
				<label>[COLOR $VAR[LabelTextColor]]$INFO[ListItem.Title][/COLOR]</label>
				<autoscroll>false</autoscroll>
				<shadowcolor />
			</control>
			<control type="textbox">
				<left>20</left>
				<top>545</top>
				<width>425</width>
				<height>100</height>
				<label>$INFO[ListItem.Plot]</label>
				<autoscroll>false</autoscroll>
				<shadowcolor />
				<font>InfoPlotSmall</font>
				<textcolor>$VAR[LabelTextColor]</textcolor>
			</control>
			<control type="label">
				<top>650</top>
				<width>445</width>
				<height>45</height>
				<label>$LOCALIZE[126]:</label>
				<textoffsetx>15</textoffsetx>
				<font>InfoTitle</font>
				<textcolor>$VAR[HighlightColor]</textcolor>
			</control>
			<control type="label">
				<top>695</top>
				<width>445</width>
				<height>45</height>
				<label>$INFO[ListItem.Status]</label>
				<textcolor>$VAR[LabelTextColor]</textcolor>
				<textoffsetx>15</textoffsetx>
				<font>InfoPlot</font>
			</control>
			<control type="label">
				<top>745</top>
				<width>445</width>
				<height>45</height>
				<label>$LOCALIZE[32011]:</label>
				<textoffsetx>15</textoffsetx>
				<font>InfoTitle</font>
				<textcolor>$VAR[HighlightColor]</textcolor>
			</control>
			<control type="label">
				<top>790</top>
				<width>445</width>
				<height>45</height>
				<label>$INFO[ListItem.Property(Air_Time)]$INFO[ListItem.Property(Studio.1.Name), @ ]</label>
				<textcolor>$VAR[LabelTextColor]</textcolor>
				<textoffsetx>15</textoffsetx>
				<font>InfoPlot</font>
			</control>
		</itemlayout>
		<focusedlayout height="840" width="447">
			<control type="image" description="fa overlay">
				<width>447</width>
				<height>840</height>
				<texture border="4" colordiffuse="$VAR[HighlightColor]">img/WhiteRoundedST2.png</texture>
				<visible>ControlGroup(5000).HasFocus()</visible>
			</control>
			<control type="image">
				<top>20</top>
				<width>445</width>
				<height>237</height>
				<aspectratio aligny="top">keep</aspectratio>
				<texture background="true">$VAR[NextAiredTVGuideArt]</texture>
			</control>
			<control type="label">
				<top>260</top>
				<width>425</width>
				<height>45</height>
				<label>[B]$INFO[ListItem.TVShowTitle][/B]</label>
				<textoffsetx>15</textoffsetx>
				<font>InfoTitle</font>
				<textcolor>$VAR[FocusedTextColor]</textcolor>
			</control>
			<control type="label">
				<top>360</top>
				<width>425</width>
				<height>45</height>
				<label>[B]$LOCALIZE[32009]:[/B]</label>
				<textoffsetx>15</textoffsetx>
				<font>InfoTitle</font>
				<textcolor>$VAR[FocusedTextColor]</textcolor>
			</control>
			<control type="label">
				<top>410</top>
				<width>425</width>
				<height>45</height>
				<label>[B]$LOCALIZE[20373]: $INFO[ListItem.Season]  $LOCALIZE[20359]: $INFO[ListItem.Episode][/B]</label>
				<textoffsetx>15</textoffsetx>
				<font>InfoPlot</font>
				<textcolor>$VAR[FocusedTextColor]</textcolor>
			</control>
			<control type="textbox">
				<left>20</left>
				<top>460</top>
				<width>425</width>
				<height>90</height>
				<label>$INFO[ListItem.Title]</label>
				<autoscroll>false</autoscroll>
				<shadowcolor />
				<textcolor>$VAR[FocusedTextColor]</textcolor>
			</control>
			<control type="textbox">
				<left>20</left>
				<top>545</top>
				<width>425</width>
				<height>100</height>
				<label>$INFO[ListItem.Plot]</label>
				<autoscroll>false</autoscroll>
				<shadowcolor />
				<font>InfoPlotSmall</font>
				<textcolor>$VAR[FocusedTextColor]</textcolor>
			</control>
			<control type="label">
				<top>650</top>
				<width>445</width>
				<height>45</height>
				<label>[B]$LOCALIZE[126]:[/B]</label>
				<textoffsetx>15</textoffsetx>
				<font>InfoTitle</font>
				<textcolor>$VAR[FocusedTextColor]</textcolor>
			</control>
			<control type="label">
				<top>695</top>
				<width>445</width>
				<height>45</height>
				<label>$INFO[ListItem.Status]</label>
				<textoffsetx>15</textoffsetx>
				<textcolor>$VAR[FocusedTextColor]</textcolor>
				<font>InfoPlot</font>
			</control>
			<control type="label">
				<top>745</top>
				<width>445</width>
				<height>45</height>
				<label>[B]$LOCALIZE[32011]:[/B]</label>
				<textoffsetx>15</textoffsetx>
				<font>InfoTitle</font>
				<textcolor>$VAR[FocusedTextColor]</textcolor>
			</control>
			<control type="label">
				<top>790</top>
				<width>445</width>
				<height>45</height>
				<label>$INFO[ListItem.Property(Air_Time)]$INFO[ListItem.Property(Studio.1.Name), @ ]</label>
				<textcolor>$VAR[FocusedTextColor]</textcolor>
				<textoffsetx>15</textoffsetx>
				<font>InfoPlot</font>
			</control>
		</focusedlayout>
	</include>
	<!-- Episode Panel layout for Embuary Info Next Aired -->
	<include name="EmbuaryInfoTVGuidePanelLayout">
		<left>505</left>
		<top>120</top>
		<width>1341</width>
		<height>930</height>
		<onup>60</onup>
		<ondown>60</ondown>
		<onleft>4000</onleft>
		<orientation>horizontal</orientation>
		<scrolltime tween="quadratic">300</scrolltime>
		<pagecontrol>60</pagecontrol>
		<itemlayout height="860" width="447">
			<control type="image">
				<top>20</top>
				<width>445</width>
				<height>237</height>
				<aspectratio aligny="top">keep</aspectratio>
				<texture background="true">$VAR[NextAiredTVGuideArt]</texture>
			</control>
			<control type="label">
				<top>260</top>
				<width>425</width>
				<height>45</height>
				<label>$INFO[ListItem.TVShowTitle]</label>
				<textoffsetx>15</textoffsetx>
				<font>InfoTitle</font>
				<textcolor>$VAR[HighlightColor]</textcolor>
			</control>
			<control type="label">
				<top>360</top>
				<width>425</width>
				<height>45</height>
				<label>$LOCALIZE[32009]:</label>
				<textoffsetx>15</textoffsetx>
				<font>InfoTitle</font>
				<textcolor>$VAR[HighlightColor]</textcolor>
			</control>
			<control type="label">
				<top>410</top>
				<width>425</width>
				<height>45</height>
				<label>[COLOR $VAR[HighlightColor]]$LOCALIZE[20373]:[/COLOR] [B][COLOR $VAR[LabelTextColor]]$INFO[ListItem.Season][/COLOR][/B]  [COLOR $VAR[HighlightColor]]$LOCALIZE[20359]:[/COLOR] [B][COLOR Grey2]$INFO[ListItem.Episode][/COLOR][/B]</label>
				<textoffsetx>15</textoffsetx>
				<font>InfoPlot</font>
			</control>
			<control type="textbox">
				<left>20</left>
				<top>460</top>
				<width>425</width>
				<height>90</height>
				<label>[COLOR $VAR[LabelTextColor]]$INFO[ListItem.Title][/COLOR]</label>
				<autoscroll>false</autoscroll>
				<shadowcolor />
			</control>
			<control type="textbox">
				<left>20</left>
				<top>545</top>
				<width>425</width>
				<height>100</height>
				<label>$INFO[ListItem.Plot]</label>
				<autoscroll>false</autoscroll>
				<shadowcolor />
				<font>InfoPlotSmall</font>
				<textcolor>$VAR[LabelTextColor]</textcolor>
			</control>
			<control type="label">
				<top>660</top>
				<width>445</width>
				<height>45</height>
				<label>$LOCALIZE[126]:</label>
				<textoffsetx>15</textoffsetx>
				<font>InfoTitle</font>
				<textcolor>$VAR[HighlightColor]</textcolor>
			</control>
			<control type="label">
				<top>705</top>
				<width>445</width>
				<height>45</height>
				<label>$INFO[ListItem.Status]</label>
				<textcolor>$VAR[LabelTextColor]</textcolor>
				<textoffsetx>15</textoffsetx>
				<font>InfoPlot</font>
			</control>
			<control type="label">
				<top>755</top>
				<width>445</width>
				<height>45</height>
				<label>$LOCALIZE[32011]:</label>
				<textoffsetx>15</textoffsetx>
				<font>InfoTitle</font>
				<textcolor>$VAR[HighlightColor]</textcolor>
			</control>
			<control type="label">
				<top>800</top>
				<width>445</width>
				<height>45</height>
				<label>$INFO[ListItem.Property(AirTime)]$INFO[ListItem.Studio, @ ]</label>
				<textcolor>$VAR[LabelTextColor]</textcolor>
				<textoffsetx>15</textoffsetx>
				<font>InfoPlot</font>
			</control>
		</itemlayout>
		<focusedlayout height="860" width="447">
			<control type="image" description="fa overlay">
				<width>447</width>
				<height>860</height>
				<texture border="4" colordiffuse="$VAR[HighlightColor]">img/WhiteRoundedST2.png</texture>
				<visible>ControlGroup(5000).HasFocus()</visible>
			</control>
			<control type="image">
				<top>20</top>
				<width>445</width>
				<height>237</height>
				<aspectratio aligny="top">keep</aspectratio>
				<texture background="true">$VAR[NextAiredTVGuideArt]</texture>
			</control>
			<control type="label">
				<top>260</top>
				<width>425</width>
				<height>45</height>
				<label>[B]$INFO[ListItem.TVShowTitle][/B]</label>
				<textoffsetx>15</textoffsetx>
				<font>InfoTitle</font>
				<textcolor>$VAR[FocusedTextColor]</textcolor>
			</control>
			<control type="label">
				<top>360</top>
				<width>425</width>
				<height>45</height>
				<label>[B]$LOCALIZE[32009]:[/B]</label>
				<textoffsetx>15</textoffsetx>
				<font>InfoTitle</font>
				<textcolor>$VAR[FocusedTextColor]</textcolor>
			</control>
			<control type="label">
				<top>410</top>
				<width>425</width>
				<height>45</height>
				<label>[B]$LOCALIZE[20373]: $INFO[ListItem.Season]  $LOCALIZE[20359]: $INFO[ListItem.Episode][/B]</label>
				<textoffsetx>15</textoffsetx>
				<font>InfoPlot</font>
				<textcolor>$VAR[FocusedTextColor]</textcolor>
			</control>
			<control type="textbox">
				<left>20</left>
				<top>460</top>
				<width>425</width>
				<height>90</height>
				<label>$INFO[ListItem.Title]</label>
				<autoscroll>false</autoscroll>
				<shadowcolor />
				<textcolor>$VAR[FocusedTextColor]</textcolor>
			</control>
			<control type="textbox">
				<left>20</left>
				<top>545</top>
				<width>425</width>
				<height>100</height>
				<label>$INFO[ListItem.Plot]</label>
				<autoscroll>false</autoscroll>
				<shadowcolor />
				<font>InfoPlotSmall</font>
				<textcolor>$VAR[FocusedTextColor]</textcolor>
			</control>
			<control type="label">
				<top>660</top>
				<width>445</width>
				<height>45</height>
				<label>[B]$LOCALIZE[126]:[/B]</label>
				<textoffsetx>15</textoffsetx>
				<font>InfoTitle</font>
				<textcolor>$VAR[FocusedTextColor]</textcolor>
			</control>
			<control type="label">
				<top>705</top>
				<width>445</width>
				<height>45</height>
				<label>$INFO[ListItem.Status]</label>
				<textoffsetx>15</textoffsetx>
				<textcolor>$VAR[FocusedTextColor]</textcolor>
				<font>InfoPlot</font>
			</control>
			<control type="label">
				<top>755</top>
				<width>445</width>
				<height>45</height>
				<label>[B]$LOCALIZE[32011]:[/B]</label>
				<textoffsetx>15</textoffsetx>
				<font>InfoTitle</font>
				<textcolor>$VAR[FocusedTextColor]</textcolor>
			</control>
			<control type="label">
				<top>800</top>
				<width>445</width>
				<height>45</height>
				<label>$INFO[ListItem.Property(AirTime)]$INFO[ListItem.Studio, @ ]</label>
				<textcolor>$VAR[FocusedTextColor]</textcolor>
				<textoffsetx>15</textoffsetx>
				<font>InfoPlot</font>
			</control>
		</focusedlayout>
	</include>

</includes>
