<?xml version="1.0" encoding="UTF-8"?>
<window>
    <defaultcontrol condition="!String.IsEmpty(Skin.String(StartupImage)) | !String.IsEmpty(Skin.String(StartupImagePath)) | !String.IsEmpty(Skin.String(StartupPlaylist))">11</defaultcontrol>
    <onload condition="System.AddonIsEnabled(script.skin.info.service)">RunScript(script.skin.info.service)</onload>
    <onload condition="Skin.HasSetting(Enable.TMDbHelper)">Skin.SetBool(TMDbHelper.Service)</onload>
	<onload condition="!Skin.HasSetting(Enable.TMDbHelper)">Skin.Reset(TMDbHelper.Service)</onload>
    <onload condition="Skin.HasSetting(Enable.BlurredVideoInfo) + Skin.HasSetting(Enable.TMDbHelper)">Skin.SetBool(TMDbHelper.EnableBlur)</onload>
	<onload condition="Skin.HasSetting(MatchPosterColors) + Skin.HasSetting(Enable.TMDbHelper)">Skin.SetBool(TMDbHelper.EnableColors)</onload>
	<onload condition="Skin.HasSetting(MatchPosterColors) + Skin.HasSetting(Enable.TMDbHelper)">SetProperty(TMDbHelper.Colors.SourceImage,poster,Home)</onload>
	<onload condition="Skin.HasSetting(MatchPosterColors) + Skin.HasSetting(Enable.TMDbHelper)">Skin.SetString(TMDbHelper.Colors.Luminance,0.75)</onload>
	<onload condition="Skin.HasSetting(MatchPosterColors) + Skin.HasSetting(Enable.TMDbHelper)">Skin.SetString(TMDbHelper.Colors.Saturation,0.75)</onload>


	<onload condition="System.AddonIsEnabled(script.artistslideshow)">RunScript(script.artistslideshow, daemon=True)</onload>
	<onload condition="String.IsEmpty(Skin.String(OSDExtraArt))">Skin.SetString(OSDExtraArt,none)</onload>


	<onload condition="String.IsEmpty(Skin.String(StartupVideoDuration))">Skin.SetString(StartupVideoDuration,00:05)</onload>


	<onload condition="!System.AddonIsEnabled(script.embuary.helper)">Skin.Reset(Enable.EmbuaryHelper)</onload>
	<onload condition="!System.AddonIsEnabled(script.embuary.helper)">Skin.Reset(UseEHBackgrounds)</onload>
	<onload condition="!System.AddonIsEnabled(script.embuary.helper)">Skin.Reset(Show.EHJumpToLetter)</onload>
	<onload condition="!System.AddonIsEnabled(plugin.video.themoviedb.helper)">Skin.Reset(Enable.TMDbHelper)</onload>


	<onload condition="String.IsEmpty(Skin.String(StartupImage)) + String.IsEmpty(Skin.String(StartupImagePath)) + String.IsEmpty(Skin.String(StartupPlaylist))">ReplaceWindow($INFO[System.StartupWindow])</onload>


	<onload condition="!String.IsEmpty(Skin.String(FocusedHomeControl))">Skin.Reset(FocusedHomeControl)</onload>


	<onunload condition="!String.IsEmpty(Skin.String(StartupPlaylist))">PlayerControl(Stop)</onunload>


	<controls>
		<control type="button" id="11">
            <visible allowhiddenfocus="true">false</visible>
			<onfocus condition="!String.IsEmpty(Skin.String(StartupImage))">AlarmClock(GoHome,ReplaceWindow($INFO[System.StartupWindow]),00:03,silent,false)</onfocus>
			<onfocus condition="!String.IsEmpty(Skin.String(StartupImagePath))">AlarmClock(GoHome,ReplaceWindow($INFO[System.StartupWindow]),00:08,silent,false)</onfocus>
			<onfocus condition="!String.IsEmpty(Skin.String(StartupPlaylist))">PlayMedia($ESCINFO[Skin.String(StartupPlaylist)],1)</onfocus>
			<onfocus condition="!String.IsEmpty(Skin.String(StartupPlaylist))">AlarmClock(GoHome,ReplaceWindow($INFO[System.StartupWindow]),$INFO[Skin.String(StartupVideoDuration)],silent,false)</onfocus>
		</control>
		<control type="group">
			<visible>Player.HasVideo</visible>
			<control type="image">
				<posx>0</posx>
                <posy>0</posy>
                <width>1920</width>
                <height>1080</height>
				<texture>black.png</texture>
			</control>
			<control type="videowindow">
				<posx>0</posx>
                <posy>0</posy>
                <width>1920</width>
                <height>1080</height>
			</control>
		</control>
		<control type="image">
            <visible>!String.IsEmpty(Skin.String(StartupImage))</visible>
            <posx>0</posx>
            <posy>0</posy>
            <width>1920</width>
            <height>1080</height>
            <aspectratio>scale</aspectratio>
            <texture>$INFO[Skin.String(StartupImage)]</texture>
        </control>
        <control type="multiimage">
            <visible>!String.IsEmpty(Skin.String(StartupImagePath))</visible>
            <posx>0</posx>
            <posy>0</posy>
            <width>1920</width>
            <height>1080</height>
            <timeperimage>2000</timeperimage>
            <randomize>true</randomize>
            <fadetime>300</fadetime>
            <aspectratio aligny="top">scale</aspectratio>
            <imagepath background="true">$INFO[Skin.String(StartupImagePath)]</imagepath>
        </control>
    </controls>
</window>