<?xml version="1.0" encoding="UTF-8"?>
<window>
	<defaultcontrol>1999</defaultcontrol>
	<include>PropertyIncludes</include>
	<onload condition="!String.IsEqual(Control.GetLabel(1002),$LOCALIZE[12021]) + Control.IsVisible(1999)">SetFocus(1999)</onload>
	<onload condition="!String.IsEqual(Control.GetLabel(1002),$LOCALIZE[12021]) + !Control.IsVisible(1999) + Control.IsVisible(1998)">SetFocus(1998)</onload>
	<onload condition="!String.IsEqual(Control.GetLabel(1002),$LOCALIZE[12021]) + !Control.IsVisible(1999) + !Control.IsVisible(1998) + Control.IsVisible(1997)">SetFocus(1997)</onload>
	<onload condition="!String.IsEqual(Control.GetLabel(1002),$LOCALIZE[12021]) + !Control.IsVisible(1999) + !Control.IsVisible(1998) + !Control.IsVisible(1997) + Control.IsVisible(1996)">SetFocus(1996)</onload>
	<controls>
		<include content="DiffuseMask"/>
		<control type="group">
			<include>Dialog_PopupOpenClose</include>
			<centerleft>50%</centerleft>
			<width>500</width>
			<centertop>50%</centertop>
			<height>1072</height>
			<control type="grouplist" id="996">
				<orientation>vertical</orientation>
				<height>auto</height>
				<align>center</align>
				<itemgap>0</itemgap>
				<onright>close</onright>
				<onleft>close</onleft>
				<usecontrolcoords>true</usecontrolcoords>
				<control type="image" id="1">
					<width>100%</width>
					<height>61</height>
					<texture border="65,0,65,0" colordiffuse="context_color">dialogs/context/top.png</texture>
				</control>
				<control type="group" id="3">
					<visible>Control.IsVisible(1995) | Control.IsVisible(1996) | Control.IsVisible(1997) | Control.IsVisible(1998) | Control.IsVisible(1999)</visible>
					<width>100%</width>
					<height>50</height>
					<control type="image">
						<width>100%</width>
						<height>50</height>
						<texture border="65,10,65,10" colordiffuse="context_color">dialogs/context/middle.png</texture>
					</control>
					<control type="label">
						<width>100%</width>
						<height>50</height>
						<align>left</align>
						<aligny>center</aligny>
						<textoffsetx>80</textoffsetx>
						<font>Med22</font>
						<textcolor>disabled</textcolor>
						<shadowcolor>text_shadow</shadowcolor>
						<scroll>true</scroll>
						<label>Embuary</label>
					</control>
				</control>
				<!-- embuary context -->
				<control type="button" id="1999">
					<include content="ContextButton"/>
					<label>$LOCALIZE[31326]</label>
					<onclick>RunScript(script.embuary.helper,action=playcinema,dbid=$INFO[Window(home).Property(ListItemDBID)],type=$INFO[Window(home).Property(ListItemDBType)])</onclick>
					<visible>!String.IsEmpty(Window(home).Property(ListItemDBID)) + [String.IsEqual(Window(home).Property(ListItemDBType),movie) | String.IsEqual(Window(home).Property(ListItemDBType),episode)] + $EXP[CinemaMode]</visible>
					<visible>!String.IsEqual(Control.GetLabel(1002),$LOCALIZE[12021]) + String.IsEqual(Control.GetLabel(1001),$LOCALIZE[208])</visible>
					<visible>String.IsEqual(Control.GetLabel(1001),$LOCALIZE[14116]) | String.IsEqual(Control.GetLabel(1002),$LOCALIZE[14116]) | String.IsEqual(Control.GetLabel(1003),$LOCALIZE[14116])</visible>
				</control>
				<control type="button" id="1998">
					<include content="ContextButton"/>
					<label>$LOCALIZE[22083]</label>
					<onclick>RunScript(script.embuary.helper,action=playfolder,dbid=$INFO[Window(home).Property(ListItemDBID)],type=$INFO[Window(home).Property(ListItemDBType)])</onclick>
					<visible>!String.IsEmpty(Window(home).Property(ListItemDBID)) + [String.IsEqual(Window(home).Property(ListItemDBType),tvshow) | String.IsEqual(Window(home).Property(ListItemDBType),season)]</visible>
					<visible>!String.IsEqual(Control.GetLabel(1004),$LOCALIZE[208])</visible>
					<visible>String.IsEqual(Control.GetLabel(1001),$LOCALIZE[14116]) | String.IsEqual(Control.GetLabel(1002),$LOCALIZE[14116]) | String.IsEqual(Control.GetLabel(1003),$LOCALIZE[14116])</visible>
				</control>
				<control type="button" id="1997">
					<include content="ContextButton"/>
					<label>$LOCALIZE[22083] ($LOCALIZE[31323])</label>
					<onclick>RunScript(script.embuary.helper,action=playfolder,dbid=$INFO[Window(home).Property(ListItemDBID)],type=$INFO[Window(home).Property(ListItemDBType)],shuffle=true)</onclick>
					<visible>!String.IsEmpty(Window(home).Property(ListItemDBID)) + [String.IsEqual(Window(home).Property(ListItemDBType),tvshow) | String.IsEqual(Window(home).Property(ListItemDBType),season)]</visible>
					<visible>String.IsEqual(Control.GetLabel(1001),$LOCALIZE[14116]) | String.IsEqual(Control.GetLabel(1002),$LOCALIZE[14116]) | String.IsEqual(Control.GetLabel(1003),$LOCALIZE[14116])</visible>
				</control>
				<control type="button" id="1996">
					<include content="ContextButton"/>
					<label>$LOCALIZE[31378]</label>
					<onclick condition="String.IsEqual(Window(home).Property(ListItemDBType),season) | String.IsEqual(Window(home).Property(ListItemDBType),episode)">RunScript(script.embuary.info,call=tv,query=$INFO[Window(home).Property(ListItemTitle)])</onclick>
					<onclick condition="String.IsEqual(Window(home).Property(ListItemDBType),tvshow)">RunScript(script.embuary.info,call=tv,dbid=$INFO[Window(home).Property(ListItemDBID)])</onclick>
					<onclick condition="String.IsEqual(Window(home).Property(ListItemDBType),movie)">RunScript(script.embuary.info,call=movie,query=$INFO[Window(home).Property(ListItemTitle)],year=$INFO[Window(home).Property(ListItemYear)],external_id=$INFO[Window(home).Property(ListItemImdbnumber)])</onclick>
					<visible>[!String.IsEmpty(Window(home).Property(ListItemImdbnumber)) | !String.IsEmpty(Window(home).Property(ListItemTitle))] + [String.IsEqual(Window(home).Property(ListItemDBType),tvshow) | String.IsEqual(Window(home).Property(ListItemDBType),season) | String.IsEqual(Window(home).Property(ListItemDBType),episode) | String.IsEqual(Window(home).Property(ListItemDBType),movie)]</visible>
					<visible>!String.IsEqual(Control.GetLabel(1001),$LOCALIZE[16105])</visible>
					<visible>String.IsEqual(Control.GetLabel(1001),$LOCALIZE[14116]) | String.IsEqual(Control.GetLabel(1002),$LOCALIZE[14116]) | String.IsEqual(Control.GetLabel(1003),$LOCALIZE[14116])</visible>
				</control>
				<!-- kodi context -->
				<control type="group" id="4">
					<visible>Control.IsVisible(1996) |Control.IsVisible(1997) | Control.IsVisible(1998) | Control.IsVisible(1999)</visible>
					<width>100%</width>
					<height>50</height>
					<control type="image">
						<width>100%</width>
						<height>50</height>
						<texture border="65,10,65,10" colordiffuse="context_color">dialogs/context/middle.png</texture>
					</control>
					<control type="label">
						<width>100%</width>
						<height>50</height>
						<align>left</align>
						<aligny>center</aligny>
						<textoffsetx>80</textoffsetx>
						<font>Med22</font>
						<textcolor>disabled</textcolor>
						<shadowcolor>text_shadow</shadowcolor>
						<scroll>true</scroll>
						<label>Kodi</label>
					</control>
				</control>
				<control type="button" id="1000">
					<include content="ContextButton"/>
				</control>
				<control type="image" id="2">
					<width>100%</width>
					<height>61</height>
					<texture border="65,0,65,0" colordiffuse="context_color">dialogs/context/bottom.png</texture>
				</control>
			</control>
		</control>
	</controls>
</window>
