Solved Can I add a condition without having to use a variable?
#1
Question 
Hi Guys,

I'm trying to play a movie trailer automatically when a movie information is displayed (DialogVideoInfo.xml). The code below works well, however, I'd like to include a condition to this to only play if a trailer is available.

PHP Code:
<onload>AlarmClock(PlayTrailer,PlayMedia($INFO[ListItem.Trailer],false,1),00:02,silent)</onload

As I have TVTunes addon enabled, the code above stops playing any theme tune playing in the background when loading a TV episode's information. I'd like to know if it's possible to include a condition without using a variable include. Is this possible at all?

Would appreciate any help. Thanks!
Reply
#2
Code:
<onload condition="!IsEmpty(ListItem.Trailer)">...</onload>


About the TVTunes thing, you can use this condition to check if theme is playing:
Code:
IsEmpty(Window(10025).Property(PlayingBackgroundMedia))
Phenomenal™ Skin • ForumWebsiteGitHub
Reply
#3
Thumbs Up 
(2016-02-05, 17:46)tomer953 Wrote:
Code:
<onload condition="!IsEmpty(ListItem.Trailer)">...</onload>


About the TVTunes thing, you can use this condition to check if theme is playing:
Code:
IsEmpty(Window(10025).Property(PlayingBackgroundMedia))

Tomer953, you are a star, I could come and kiss you right now Big Grin Thank you SO much, this was exactly what I needed and the TVTunes thing is a bonus.


Thanks once again
Reply

Logout Mark Read Team Forum Stats Members Help
Can I add a condition without having to use a variable?0