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

	<!-- Defaults -->
	<include name="Default_Transition">
		<definition>
			<onclick condition="!String.IsEqual(Container($PARAM[id]).ListItem.DBID,Window.Property(SelectedItem))">SetProperty(Breadcrumb_GoToNext,true)</onclick>
			<onclick condition="!String.IsEqual(Container($PARAM[id]).ListItem.DBID,Window.Property(SelectedItem))">SetProperty(Infoscreen_Transition,true,home)</onclick>
			<onclick condition="!String.IsEqual(Container($PARAM[id]).ListItem.DBID,Window.Property(SelectedItem))">Dialog.Close(all,true)</onclick>
			<onclick condition="!String.IsEqual(Container($PARAM[id]).ListItem.DBID,Window.Property(SelectedItem)) + String.IsEqual(Container($PARAM[id]).ListItem.DBType,movie) + !Window.IsVisible(videos)">ActivateWindow(Videos,videodb://movies/titles/?xsp=%7B%22order%22%3A%7B%22direction%22%3A%22ascending%22%2C%22ignorefolders%22%3A0%2C%22method%22%3A%22sorttitle%22%7D%2C%22rules%22%3A%7B%22and%22%3A%5B%7B%22field%22%3A%22title%22%2C%22operator%22%3A%22is%22%2C%22value%22%3A%5B$ESCINFO[Container($PARAM[id]).ListItem.Title]%5D%7D%5D%7D%2C%22type%22%3A%22movies%22%7D)</onclick>
			<onclick condition="!String.IsEqual(Container($PARAM[id]).ListItem.DBID,Window.Property(SelectedItem)) + String.IsEqual(Container($PARAM[id]).ListItem.DBType,movie) + Window.IsVisible(videos)">Container.Update(videodb://movies/titles/?xsp=%7B%22order%22%3A%7B%22direction%22%3A%22ascending%22%2C%22ignorefolders%22%3A0%2C%22method%22%3A%22sorttitle%22%7D%2C%22rules%22%3A%7B%22and%22%3A%5B%7B%22field%22%3A%22title%22%2C%22operator%22%3A%22is%22%2C%22value%22%3A%5B$ESCINFO[Container($PARAM[id]).ListItem.Title]%5D%7D%5D%7D%2C%22type%22%3A%22movies%22%7D)</onclick>
			<onclick condition="!String.IsEqual(Container($PARAM[id]).ListItem.DBID,Window.Property(SelectedItem)) + String.IsEqual(Container($PARAM[id]).ListItem.DBType,tvshow) + !Window.IsVisible(videos)">ActivateWindow(Videos,videodb://tvshows/titles/?xsp=%7B%22order%22%3A%7B%22direction%22%3A%22ascending%22%2C%22ignorefolders%22%3A0%2C%22method%22%3A%22sorttitle%22%7D%2C%22rules%22%3A%7B%22and%22%3A%5B%7B%22field%22%3A%22title%22%2C%22operator%22%3A%22is%22%2C%22value%22%3A%5B$ESCINFO[Container($PARAM[id]).ListItem.Title]%5D%7D%5D%7D%2C%22type%22%3A%22tvshows%22%7D)</onclick>
			<onclick condition="!String.IsEqual(Container($PARAM[id]).ListItem.DBID,Window.Property(SelectedItem)) + String.IsEqual(Container($PARAM[id]).ListItem.DBType,tvshow) + Window.IsVisible(videos)">Container.Update(videodb://tvshows/titles/?xsp=%7B%22order%22%3A%7B%22direction%22%3A%22ascending%22%2C%22ignorefolders%22%3A0%2C%22method%22%3A%22sorttitle%22%7D%2C%22rules%22%3A%7B%22and%22%3A%5B%7B%22field%22%3A%22title%22%2C%22operator%22%3A%22is%22%2C%22value%22%3A%5B$ESCINFO[Container($PARAM[id]).ListItem.Title]%5D%7D%5D%7D%2C%22type%22%3A%22tvshows%22%7D)</onclick>
			<onclick condition="!String.IsEqual(Container($PARAM[id]).ListItem.DBID,Window.Property(SelectedItem)) + String.IsEqual(Container($PARAM[id]).ListItem.DBType,musicvideo) + !Window.IsVisible(videos)">ActivateWindow(Videos,videodb://musicvideos/titles/?xsp=%7B%22order%22%3A%7B%22direction%22%3A%22ascending%22%2C%22ignorefolders%22%3A0%2C%22method%22%3A%22sorttitle%22%7D%2C%22rules%22%3A%7B%22and%22%3A%5B%7B%22field%22%3A%22title%22%2C%22operator%22%3A%22is%22%2C%22value%22%3A%5B$ESCINFO[Container($PARAM[id]).ListItem.Title]%5D%7D%5D%7D%2C%22type%22%3A%22musicvideos%22%7D)</onclick>
			<onclick condition="!String.IsEqual(Container($PARAM[id]).ListItem.DBID,Window.Property(SelectedItem)) + String.IsEqual(Container($PARAM[id]).ListItem.DBType,musicvideo) + Window.IsVisible(videos)">Container.Update(videodb://musicvideos/titles/?xsp=%7B%22order%22%3A%7B%22direction%22%3A%22ascending%22%2C%22ignorefolders%22%3A0%2C%22method%22%3A%22sorttitle%22%7D%2C%22rules%22%3A%7B%22and%22%3A%5B%7B%22field%22%3A%22title%22%2C%22operator%22%3A%22is%22%2C%22value%22%3A%5B$ESCINFO[Container($PARAM[id]).ListItem.Title]%5D%7D%5D%7D%2C%22type%22%3A%22musicvideos%22%7D)</onclick>
			<onclick condition="!String.IsEqual(Container($PARAM[id]).ListItem.DBID,Window.Property(SelectedItem)) + String.IsEqual(Container($PARAM[id]).ListItem.DBType,artist) + !Window.IsVisible(music)">ActivateWindow(Music,musicdb://artists/?xsp=%7B%22order%22%3A%7B%22direction%22%3A%22ascending%22%2C%22ignorefolders%22%3A0%2C%22method%22%3A%22sorttitle%22%7D%2C%22rules%22%3A%7B%22and%22%3A%5B%7B%22field%22%3A%22artist%22%2C%22operator%22%3A%22is%22%2C%22value%22%3A%5B$ESCINFO[Container($PARAM[id]).ListItem.Artist]%5D%7D%5D%7D%2C%22type%22%3A%22artists%22%7D)</onclick>
			<onclick condition="!String.IsEqual(Container($PARAM[id]).ListItem.DBID,Window.Property(SelectedItem)) + String.IsEqual(Container($PARAM[id]).ListItem.DBType,artist) + Window.IsVisible(music)">Container.Update(musicdb://artists/?xsp=%7B%22order%22%3A%7B%22direction%22%3A%22ascending%22%2C%22ignorefolders%22%3A0%2C%22method%22%3A%22sorttitle%22%7D%2C%22rules%22%3A%7B%22and%22%3A%5B%7B%22field%22%3A%22artist%22%2C%22operator%22%3A%22is%22%2C%22value%22%3A%5B$ESCINFO[Container($PARAM[id]).ListItem.Artist]%5D%7D%5D%7D%2C%22type%22%3A%22artists%22%7D)</onclick>
			<onclick condition="!String.IsEqual(Container($PARAM[id]).ListItem.DBID,Window.Property(SelectedItem)) + String.IsEqual(Container($PARAM[id]).ListItem.DBType,album) + !Window.IsVisible(music)">ActivateWindow(Music,musicdb://albums/?xsp=%7B%22order%22%3A%7B%22direction%22%3A%22ascending%22%2C%22ignorefolders%22%3A0%2C%22method%22%3A%22sorttitle%22%7D%2C%22rules%22%3A%7B%22and%22%3A%5B%7B%22field%22%3A%22album%22%2C%22operator%22%3A%22is%22%2C%22value%22%3A%5B$ESCINFO[Container($PARAM[id]).ListItem.Album]%5D%7D%5D%7D%2C%22type%22%3A%22album%22%7D)</onclick>
			<onclick condition="!String.IsEqual(Container($PARAM[id]).ListItem.DBID,Window.Property(SelectedItem)) + String.IsEqual(Container($PARAM[id]).ListItem.DBType,album) + Window.IsVisible(music)">Container.Update(musicdb://albums/?xsp=%7B%22order%22%3A%7B%22direction%22%3A%22ascending%22%2C%22ignorefolders%22%3A0%2C%22method%22%3A%22sorttitle%22%7D%2C%22rules%22%3A%7B%22and%22%3A%5B%7B%22field%22%3A%22album%22%2C%22operator%22%3A%22is%22%2C%22value%22%3A%5B$ESCINFO[Container($PARAM[id]).ListItem.Album]%5D%7D%5D%7D%2C%22type%22%3A%22albums%22%7D)</onclick>
			<onclick condition="!String.IsEqual(Container($PARAM[id]).ListItem.DBID,Window.Property(SelectedItem))">SetFocus(6001)</onclick>
			<onclick>SetFocus(3000)</onclick>
		</definition>
	</include>

	<include name="Default_Play_Items">
		<param name="type" default="videos" />
		<param name="method" default="from_here" />
		<definition>
			<onclick condition="System.AddonIsEnabled(script.copacetic.helper) + Control.HasFocus(3201)">RunScript(script.copacetic.helper,action=play_items,id=3201,type=$PARAM[type],method=$PARAM[method])</onclick>
			<onclick condition="System.AddonIsEnabled(script.copacetic.helper) + Control.HasFocus(3202)">RunScript(script.copacetic.helper,action=play_items,id=3202,type=$PARAM[type],method=$PARAM[method])</onclick>
			<onclick condition="System.AddonIsEnabled(script.copacetic.helper) + Control.HasFocus(3203)">RunScript(script.copacetic.helper,action=play_items,id=3203,type=$PARAM[type],method=$PARAM[method])</onclick>
			<onclick condition="System.AddonIsEnabled(script.copacetic.helper) + Control.HasFocus(3204)">RunScript(script.copacetic.helper,action=play_items,id=3204,type=$PARAM[type],method=$PARAM[method])</onclick>
			<onclick condition="System.AddonIsEnabled(script.copacetic.helper) + Control.HasFocus(3205)">RunScript(script.copacetic.helper,action=play_items,id=3205,type=$PARAM[type],method=$PARAM[method])</onclick>
			<onclick condition="System.AddonIsEnabled(script.copacetic.helper) + Control.HasFocus(3206)">RunScript(script.copacetic.helper,action=play_items,id=3206,type=$PARAM[type],method=$PARAM[method])</onclick>
			<onclick condition="System.AddonIsEnabled(script.copacetic.helper) + Control.HasFocus(3207)">RunScript(script.copacetic.helper,action=play_items,id=3207,type=$PARAM[type],method=$PARAM[method])</onclick>
			<onclick condition="System.AddonIsEnabled(script.copacetic.helper) + Control.HasFocus(3208)">RunScript(script.copacetic.helper,action=play_items,id=3208,type=$PARAM[type],method=$PARAM[method])</onclick>
			<onclick condition="System.AddonIsEnabled(script.copacetic.helper) + Control.HasFocus(3209)">RunScript(script.copacetic.helper,action=play_items,id=3209,type=$PARAM[type],method=$PARAM[method])</onclick>
		</definition>
	</include>


	<!-- Click actions -->
	<include name="ClickAction_Blank">
		<control type="group" />
	</include>

	<include name="ClickAction_Open_More_From_Director">
		<include content="Default_Transition" condition="Integer.IsGreater(ListItem.DBID,0)">
			<param name="id" value="3205" />
		</include>
		<onclick condition="!Integer.IsGreater(ListItem.DBID,0) + !String.IsEqual(Container(3205).ListItem.Property(tmdb_id),window(movieinformation).property(SelectedItem))">Dialog.Close(all,true)</onclick>
		<onclick condition="!Integer.IsGreater(ListItem.DBID,0) + !String.IsEqual(Container(3205).ListItem.Property(tmdb_id),window(movieinformation).property(SelectedItem))">RunScript(plugin.video.themoviedb.helper,add_path=$INFO[Container(3205).ListItem.FolderPath],call_auto=1190)</onclick>
		<onclick condition="!Integer.IsGreater(ListItem.DBID,0) + String.IsEqual(Container(3205).ListItem.Property(tmdb_id),window(movieinformation).property(SelectedItem)) + String.IsEqual(Container(3205).ListItem.DBType,movie)">RunScript(plugin.video.themoviedb.helper,close_dialog=1190)</onclick>
		<onclick condition="!Integer.IsGreater(ListItem.DBID,0) + String.IsEqual(Container(3205).ListItem.Property(tmdb_id),window(movieinformation).property(SelectedItem)) + String.IsEqual(Container(3205).ListItem.DBType,movie)">Runscript(plugin.video.themoviedb.helper,play=movie,tmdb_id=$INFO[Container(3205).ListItem.UniqueID(tmdb)]),imdb_id=$INFO[Container(3205).ListItem.UniqueID(imdb)])</onclick>
	</include>

	<include name="ClickAction_Open_MovieSet">
		<include content="Default_Transition" condition="Integer.IsGreater(ListItem.DBID,0)">
			<param name="id" value="3201" />
		</include>
		<onclick condition="!Integer.IsGreater(ListItem.DBID,0) + !String.IsEqual(Container(3201).ListItem.Property(tmdb_id),window(movieinformation).property(SelectedItem))">Dialog.Close(all,true)</onclick>
		<onclick condition="!Integer.IsGreater(ListItem.DBID,0) + !String.IsEqual(Container(3201).ListItem.Property(tmdb_id),window(movieinformation).property(SelectedItem))">RunScript(plugin.video.themoviedb.helper,add_path=$INFO[Container(3201).ListItem.FolderPath],call_auto=1190)</onclick>
		<onclick condition="!Integer.IsGreater(ListItem.DBID,0) + String.IsEqual(Container(3201).ListItem.Property(tmdb_id),window(movieinformation).property(SelectedItem))">RunScript(plugin.video.themoviedb.helper,close_dialog=1190)</onclick>
		<onclick condition="!Integer.IsGreater(ListItem.DBID,0) + String.IsEqual(Container(3201).ListItem.Property(tmdb_id),window(movieinformation).property(SelectedItem))">Runscript(plugin.video.themoviedb.helper,play=movie,tmdb_id=$INFO[Container(3201).ListItem.UniqueID(tmdb)]),imdb_id=$INFO[Container(3201).ListItem.UniqueID(imdb)])</onclick>
	</include>

	<include name="ClickAction_ActorCredits">
		<include content="Default_Transition" condition="Integer.IsGreater(ListItem.DBID,0)">
			<param name="id" value="3203" />
		</include>
		<onclick condition="!Integer.IsGreater(ListItem.DBID,0) + !String.IsEqual(Container(3203).ListItem.Property(tmdb_id),window(movieinformation).property(SelectedItem))">Dialog.Close(all,true)</onclick>
		<onclick condition="!Integer.IsGreater(ListItem.DBID,0) + !String.IsEqual(Container(3203).ListItem.Property(tmdb_id),window(movieinformation).property(SelectedItem))">RunScript(plugin.video.themoviedb.helper,add_path=$INFO[Container(3203).ListItem.FolderPath],call_auto=1190)</onclick>
		<onclick condition="!Integer.IsGreater(ListItem.DBID,0) + String.IsEqual(Container(3203).ListItem.Property(tmdb_id),window(movieinformation).property(SelectedItem)) + String.IsEqual(Container(3203).ListItem.DBType,movie)">RunScript(plugin.video.themoviedb.helper,close_dialog=1190)</onclick>
		<onclick condition="!Integer.IsGreater(ListItem.DBID,0) + String.IsEqual(Container(3203).ListItem.Property(tmdb_id),window(movieinformation).property(SelectedItem)) + String.IsEqual(Container(3203).ListItem.DBType,movie)">Runscript(plugin.video.themoviedb.helper,play=movie,tmdb_id=$INFO[Container(3203).ListItem.UniqueID(tmdb)]),imdb_id=$INFO[Container(3203).ListItem.UniqueID(imdb)])</onclick>
	</include>

	<include name="ClickAction_Open_More_From_Studio">
		<include content="Default_Transition" condition="Integer.IsGreater(ListItem.DBID,0)">
			<param name="id" value="3206" />
		</include>
		<onclick condition="!Integer.IsGreater(ListItem.DBID,0) + !String.IsEqual(Container(3206).ListItem.Property(tmdb_id),window(movieinformation).property(SelectedItem))">Dialog.Close(all,true)</onclick>
		<onclick condition="!Integer.IsGreater(ListItem.DBID,0) + !String.IsEqual(Container(3206).ListItem.Property(tmdb_id),window(movieinformation).property(SelectedItem))">RunScript(plugin.video.themoviedb.helper,add_path=$INFO[Container(3206).ListItem.FolderPath],call_auto=1190)</onclick>
		<onclick condition="!Integer.IsGreater(ListItem.DBID,0) + String.IsEqual(Container(3206).ListItem.Property(tmdb_id),window(movieinformation).property(SelectedItem)) + String.IsEqual(Container(3206).ListItem.DBType,movie)">RunScript(plugin.video.themoviedb.helper,close_dialog=1190)</onclick>
		<onclick condition="!Integer.IsGreater(ListItem.DBID,0) + String.IsEqual(Container(3206).ListItem.Property(tmdb_id),window(movieinformation).property(SelectedItem)) + String.IsEqual(Container(3206).ListItem.DBType,movie)">Runscript(plugin.video.themoviedb.helper,play=movie,tmdb_id=$INFO[Container(3206).ListItem.UniqueID(tmdb)]),imdb_id=$INFO[Container(3206).ListItem.UniqueID(imdb)])</onclick>
	</include>

	<include name="ClickAction_Open_Similar">
		<include content="Default_Transition" condition="Integer.IsGreater(ListItem.DBID,0)">
			<param name="id" value="3207" />
		</include>
		<onclick condition="!Integer.IsGreater(ListItem.DBID,0) + !String.IsEqual(Container(3207).ListItem.Property(tmdb_id),window(movieinformation).property(SelectedItem))">Dialog.Close(all,true)</onclick>
		<onclick condition="!Integer.IsGreater(ListItem.DBID,0) + !String.IsEqual(Container(3207).ListItem.Property(tmdb_id),window(movieinformation).property(SelectedItem))">RunScript(plugin.video.themoviedb.helper,add_path=$INFO[Container(3207).ListItem.FolderPath],call_auto=1190)</onclick>
		<onclick condition="!Integer.IsGreater(ListItem.DBID,0) + String.IsEqual(Container(3207).ListItem.Property(tmdb_id),window(movieinformation).property(SelectedItem)) + String.IsEqual(Container(3207).ListItem.DBType,movie)">RunScript(plugin.video.themoviedb.helper,close_dialog=1190)</onclick>
		<onclick condition="!Integer.IsGreater(ListItem.DBID,0) + String.IsEqual(Container(3207).ListItem.Property(tmdb_id),window(movieinformation).property(SelectedItem)) + String.IsEqual(Container(3207).ListItem.DBType,movie)">Runscript(plugin.video.themoviedb.helper,play=movie,tmdb_id=$INFO[Container(3207).ListItem.UniqueID(tmdb)]),imdb_id=$INFO[Container(3207).ListItem.UniqueID(imdb)])</onclick>
	</include>

	<include name="ClickAction_Open_Similar_Artists">
		<include content="Default_Transition" condition="Integer.IsGreater(ListItem.DBID,0)">
			<param name="id" value="3207" />
		</include>
	</include>

	<include name="ClickAction_Open_Similar_Albums">
		<include content="Default_Transition" condition="Integer.IsGreater(ListItem.DBID,0)">
			<param name="id" value="3207" />
		</include>
	</include>

	<include name="ClickAction_Home_Open_Album">
		<onclick>ActivateWindow(music,musicdb://albums/$INFO[Container.ListItem.DBID]/-2/?albumid=$INFO[Container.ListItem.DBID],return)</onclick>
	</include>

	<include name="ClickAction_Play_All_Songs">
		<include content="Default_Play_Items">
			<param name="type" value="music" />
		</include>
	</include>

	<include name="ClickAction_Play_Episodes">
		<onclick condition="Integer.IsGreater(ListItem.DBID,0) + !String.IsEqual(Container(3201).ListItem.DBID,window(movieinformation).property(SelectedItem)) + !String.IsEqual(Container.FolderPath,Window(movieinformation).Property(ContainerPath_1)">SetProperty(SentFromInfo,true,movieinformation)</onclick>
		<onclick condition="Integer.IsGreater(ListItem.DBID,0) + !String.IsEqual(Container(3201).ListItem.DBID,window(movieinformation).property(SelectedItem)) + !String.IsEqual(Container.FolderPath,Window(movieinformation).Property(ContainerPath_1)">Container.Update($INFO[Container(3201).ListItem.FolderPath],replace)</onclick>
		<onclick condition="Integer.IsGreater(ListItem.DBID,0) + !String.IsEqual(Container(3201).ListItem.DBID,window(movieinformation).property(SelectedItem))">Dialog.Close(all)</onclick>
		<onclick condition="Integer.IsGreater(ListItem.DBID,0) + !String.IsEqual(Container(3201).ListItem.DBID,window(movieinformation).property(SelectedItem))">PlayMedia($ESCINFO[ListItem.Filenameandpath])</onclick>
	</include>

	<include name="ClickAction_Open_Season_Folder">
		<onclick condition="Integer.IsGreater(ListItem.DBID,0)">Dialog.Close(all)</onclick>
		<onclick condition="Integer.IsGreater(ListItem.DBID,0)">SetProperty(SentFromInfo,true,movieinformation)</onclick>
		<onclick condition="Integer.IsGreater(ListItem.DBID,0)">ActivateWindow(Videos,$INFO[Container(3202).ListItem.FolderPath]/,return)</onclick>
	</include>

	<include name="ClickAction_Open_Album">
		<onclick>Dialog.Close(all)</onclick>
		<onclick>SetProperty(SentFromInfo,true,musicinformation)</onclick>
		<onclick>ActivateWindow(music,musicdb://albums/$INFO[Container(3202).ListItem.DBID]/-2/,return)</onclick>
	</include>

	<include name="ClickAction_Open_Set">
		<onclick>Dialog.Close(all)</onclick>
		<onclick>SetProperty(SentFromInfo,true,movieinformation)</onclick>
		<onclick>ActivateWindow(videos,videodb://movies/sets/$INFO[ListItem.DBID]/,return)</onclick>
	</include>

	<include name="ClickAction_Play_MusicVideos">
		<onclick condition="!String.IsEqual(Container.FolderPath,Window(movieinformation).Property(ContainerPath_1)">Container.Update($INFO[Window(movieinformation).Property(ContainerPath_1)],replace)</onclick>
		<onclick>Dialog.Close(all)</onclick>
		<include content="Default_Play_Items" />
	</include>

</includes>