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

	<variable name="AutoComplete_Path">
		<value condition="System.AddonIsEnabled(plugin.program.autocompletion) + !System.HasHiddenInput">plugin://plugin.program.autocompletion?info=autocomplete&amp;&amp;id=$INFO[Control.GetLabel(312).index(1)]&amp;&amp;limit=9</value>
	</variable>

	<include name="Background_Home_Content">
		<content sortby="random">$VAR[Background_Home_Path]</content>
	</include>

	<include name="Background_Global_Content">
		<content sortby="random" limit="5">videodb://movies/titles/</content>
		<content sortby="random" limit="5">videodb://tvshows/titles/</content>
		<content sortby="random" limit="5">videodb://movies/titles/</content>
		<content sortby="random" limit="5">videodb://tvshows/titles/</content>
		<content sortby="random" limit="5">videodb://movies/titles/</content>
	</include>

	<include name="Background_Media_Content">
		<content sortby="random">$VAR[Background_Media_Path]</content>
	</include>

	<variable name="Background_Home_Path">
		<!-- Global override -->
		<value condition="Skin.HasSetting(Home_Background_Override_Enabled) + Skin.String(Home_Background_Override_Path)">$INFO[Skin.String(Home_Background_Override_Path)]</value>
		<!-- Item override -->
		<value condition="!String.IsEmpty(Container(3000).ListItem.Property(backgroundPlaylist))">$INFO[Container(3000).ListItem.Property(backgroundPlaylist)]</value>
		<!-- playlists and xml library paths e.g. inprogress or sets -->
		<value condition="String.Contains(Container(3000).ListItem.Property(list),.xsp)">$INFO[Container(3000).ListItem.Property(list)]</value>
		<value condition="String.Contains(Container(3000).ListItem.Property(list),.xml)">$INFO[Container(3000).ListItem.Property(list)]</value>
		<!-- music paths -->
		<value condition="String.Contains(Container(3000).ListItem.Property(list),recentlyaddedalbums)">musicdb://recentlyaddedalbums/</value>
		<value condition="String.Contains(Container(3000).ListItem.Property(list),recentlyplayedalbums)">musicdb://recentlyplayedalbums/</value>
		<value condition="String.Contains(Container(3000).ListItem.Property(list),musicdb)">musicdb://artists/?albumartistsonly=true</value>
		<!-- video paths -->
		<value condition="String.Contains(Container(3000).ListItem.Property(list),recentlyaddedepisodes)">videodb://recentlyaddedepisodes/</value>
		<value condition="String.Contains(Container(3000).ListItem.Property(list),tvshows)">videodb://tvshows/titles/</value>
		<value condition="String.Contains(Container(3000).ListItem.Property(list),recentlyaddedmovies)">ideodb://recentlyaddedmovies/</value>
		<value condition="String.Contains(Container(3000).ListItem.Property(list),movies)">videodb://movies/titles/</value>
		<!-- fallbacks -->
		<value condition="Library.HasContent(Movies)">videodb://movies/titles/</value>
		<value condition="Library.HasContent(TVShows)">videodb://tvshows/titles/</value>
		<value condition="Library.HasContent(Music)">musicdb://artists/?albumartistsonly=true</value>
		<value/>
	</variable>

	<variable name="Background_Media_Path">
		<value condition="!String.Contains(Container.FolderPath,plugin://)">$INFO[ListItem.FolderPath]</value>
	</variable>

	<variable name="Secondary_List_Sort">
		<value condition="Container.Content(tvshows)">season</value>
		<value>year</value>
	</variable>

	<variable name="Secondary_List_Sort_Order">
		<value condition="Window.Is(music)">descending</value>
		<value>ascending</value>
	</variable>

	<variable name="Secondary_List_Target">
		<value condition="Window.Is(music)">music</value>
		<value>videos</value>
	</variable>

</includes>