Skip to content
This repository has been archived by the owner on Nov 7, 2024. It is now read-only.

Commit

Permalink
⚡ Move trailers autoplay in info dialog to Timers.xml
Browse files Browse the repository at this point in the history
  • Loading branch information
jurialmunkey committed Jun 19, 2024
1 parent c2a31a1 commit f0b8e5e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 15 deletions.
5 changes: 0 additions & 5 deletions 1080i/DialogVideoInfo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,6 @@

<include>DialogInfo_Onload</include>

<onload condition="!Player.HasVideo + !String.IsEmpty(ListItem.Trailer) + !Skin.HasSetting(Background.DisableVideo) + Skin.HasSetting(Trailers.EnableAutoPlayback.Info)">PlayMedia($ESCINFO[ListItem.Trailer],False,1)</onload>
<onload condition="!Player.HasVideo + !String.IsEmpty(ListItem.Trailer) + !Skin.HasSetting(Background.DisableVideo) + Skin.HasSetting(Trailers.EnableAutoPlayback.Info)">SetProperty(Trailer,$ESCINFO[ListItem.Trailer],1123)</onload>
<onunload condition="Player.HasVideo + String.IsEqual(Window(1123).Property(Trailer),Player.FileNameAndPath)">Stop</onunload>


<controls>
<include>Defs_TMDbHelper_Loader</include>

Expand Down
21 changes: 11 additions & 10 deletions 1080i/Timers.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@

<timer>
<name>idle_spotlight_trailer</name>
<start reset="true">Skin.HasSetting(Trailers.EnableAutoPlayback) + Integer.IsEqual(Window.Property(TMDBHelper.WidgetContainer),301) + String.IsEmpty(Window.Property(Slide.WidgetContainer)) + !String.IsEmpty(Container(301).ListItem.Trailer)</start>
<reset>![Skin.HasSetting(Trailers.EnableAutoPlayback) + Integer.IsEqual(Window.Property(TMDBHelper.WidgetContainer),301) + String.IsEmpty(Window.Property(Slide.WidgetContainer)) + !String.IsEmpty(Container(301).ListItem.Trailer)] | !String.IsEqual(Window(Home).Property(AutoTrailer),Container(301).ListItem.Trailer) | [Player.HasVideo + !String.IsEqual(Window(Home).Property(PlayTrailer),Player.FileNameAndPath)]</reset>
<stop>![Skin.HasSetting(Trailers.EnableAutoPlayback) + Integer.IsEqual(Window.Property(TMDBHelper.WidgetContainer),301) + String.IsEmpty(Window.Property(Slide.WidgetContainer)) + !String.IsEmpty(Container(301).ListItem.Trailer)] | !String.IsEqual(Window(Home).Property(AutoTrailer),Container(301).ListItem.Trailer) | [Player.HasVideo + !String.IsEqual(Window(Home).Property(PlayTrailer),Player.FileNameAndPath)]</stop>
<onstart>SetProperty(AutoTrailer,$ESCINFO[Container(301).ListItem.Trailer],Home)</onstart>
<onstart>SetProperty(AutoTrailerTitle,$ESCINFO[Container(301).ListItem.Title],Home)</onstart>
<start reset="true">[[Skin.HasSetting(Trailers.EnableAutoPlayback) + Integer.IsEqual(Window.Property(TMDBHelper.WidgetContainer),301) + String.IsEmpty(Window.Property(Slide.WidgetContainer))] | [Skin.HasSetting(Trailers.EnableAutoPlayback.Info) + Window.IsVisible(DialogVideoInfo.xml)]] + !String.IsEmpty(Container(99950).ListItem.Trailer)</start>
<reset>![[[Skin.HasSetting(Trailers.EnableAutoPlayback) + Integer.IsEqual(Window.Property(TMDBHelper.WidgetContainer),301) + String.IsEmpty(Window.Property(Slide.WidgetContainer))] | [Skin.HasSetting(Trailers.EnableAutoPlayback.Info) + Window.IsVisible(DialogVideoInfo.xml)]] + !String.IsEmpty(Container(99950).ListItem.Trailer)] | !String.IsEqual(Window(Home).Property(AutoTrailer),Container(99950).ListItem.Trailer) | [Player.HasVideo + !String.IsEqual(Window(Home).Property(PlayTrailer),Player.FileNameAndPath)]</reset>
<stop>![[[Skin.HasSetting(Trailers.EnableAutoPlayback) + Integer.IsEqual(Window.Property(TMDBHelper.WidgetContainer),301) + String.IsEmpty(Window.Property(Slide.WidgetContainer))] | [Skin.HasSetting(Trailers.EnableAutoPlayback.Info) + Window.IsVisible(DialogVideoInfo.xml)]] + !String.IsEmpty(Container(99950).ListItem.Trailer)] | !String.IsEqual(Window(Home).Property(AutoTrailer),Container(99950).ListItem.Trailer) | [Player.HasVideo + !String.IsEqual(Window(Home).Property(PlayTrailer),Player.FileNameAndPath)]</stop>
<onstart>SetProperty(AutoTrailer,$ESCINFO[Container(99950).ListItem.Trailer],Home)</onstart>
<onstart>SetProperty(AutoTrailerTitle,$ESCINFO[Container(99950).ListItem.Title],Home)</onstart>
<onstop condition="Player.HasVideo + String.IsEqual(Window(Home).Property(PlayTrailer),Player.FileNameAndPath)">Action(Stop)</onstop>
<onstop condition="Player.HasVideo + String.IsEqual(Window(Home).Property(PlayTrailer),Player.FileNameAndPath)">ClearProperty(PlayTrailer,Home)</onstop>
<onstop condition="Player.HasVideo + String.IsEqual(Window(Home).Property(PlayTrailer),Player.FileNameAndPath)">ClearProperty(PlayTrailerTitle,Home)</onstop>
Expand All @@ -17,10 +17,11 @@

<timer>
<name>play_spotlight_trailer</name>
<start reset="true">Integer.IsGreater(Skin.TimerElapsedSecs(idle_spotlight_trailer),3) + !Player.HasVideo + System.IdleTime(3)</start>
<stop>![Integer.IsGreater(Skin.TimerElapsedSecs(idle_spotlight_trailer),3) + !Player.HasVideo]</stop>
<onstart condition="!String.IsEmpty(Container(301).ListItem.Trailer)">SetProperty(PlayTrailerTitle,$ESCINFO[Container(301).ListItem.Title],Home)</onstart>
<onstart condition="!String.IsEmpty(Container(301).ListItem.Trailer)">SetProperty(PlayTrailer,$ESCINFO[Container(301).ListItem.Trailer],Home)</onstart>
<onstart condition="!String.IsEmpty(Container(301).ListItem.Trailer)">PlayMedia($ESCINFO[Container(301).ListItem.Trailer],1)</onstart>
<start reset="true">!Player.HasVideo + [[Integer.IsGreater(Skin.TimerElapsedSecs(idle_spotlight_trailer),3) + System.IdleTime(3)] | [Integer.IsGreater(Skin.TimerElapsedSecs(idle_spotlight_trailer),1) + Skin.HasSetting(Trailers.EnableAutoPlayback.Info) + Window.IsVisible(DialogVideoInfo.xml)]]</start>
<stop>![!Player.HasVideo + [[Integer.IsGreater(Skin.TimerElapsedSecs(idle_spotlight_trailer),3) + System.IdleTime(3)] | [Integer.IsGreater(Skin.TimerElapsedSecs(idle_spotlight_trailer),1) + Skin.HasSetting(Trailers.EnableAutoPlayback.Info) + Window.IsVisible(DialogVideoInfo.xml)]]]</stop>
<onstart condition="!String.IsEmpty(Container(99950).ListItem.Trailer)">SetProperty(PlayTrailerTitle,$ESCINFO[Container(99950).ListItem.Title],Home)</onstart>
<onstart condition="!String.IsEmpty(Container(99950).ListItem.Trailer)">SetProperty(PlayTrailer,$ESCINFO[Container(99950).ListItem.Trailer],Home)</onstart>
<onstart condition="!String.IsEmpty(Container(99950).ListItem.Trailer)">SetProperty(Trailer,$ESCINFO[Container(99950).ListItem.Trailer],1123)</onstart>
<onstart condition="!String.IsEmpty(Container(99950).ListItem.Trailer)">PlayMedia($ESCINFO[Container(99950).ListItem.Trailer],1)</onstart>
</timer>
</timers>

0 comments on commit f0b8e5e

Please sign in to comment.