Hi,
I wondered if anyone knew of a way to test from a script whether the XBMC screensaver is running?
I've looked through GUISettings.cpp for something that would be available via the HTTP API, but can't find anything that seems relevant.
Basically I'd looking to write a script to test that XBMC is idle (so I have test's for currentlyplaying and currentslide), I wanted to use the screensaver as a final confirmation that nothing was going on.
Cheers in advance,
~Dan
I think that it's been long enough that I can bump ... anyone got a suggestion?
I'm wondering though if this post might be in the wrong place and will post a similar question in the general support.
Dan,
Thanks for your reply, I'd trawled through the built-in functions and HTTP API and not found anything (though I will concede that I might have missed the command that gave me what I wanted
).
I ended up adding a command isscreensaver active to the HTTP API myself which works quite well. It made me realise how long it's been since I've worked in C++ though!
Cheers for your help.
I was thinking that another option is to check if video / audio / pictures are "playing", check the System.IdleTime() and if longer than the "Screensaver idle timeout", that would probably mean that the screensaver is on.
But having a specific function does help, maybe you can submit your code changes as an enhancement request to be included in the base code (
http://trac.xbmc.org), definitely others will find it useful as well.
I am actually performing a check on audio / video / pictures in my script. The screen saver check would have just been the final check I needed. For some reason I'd never been able to get a response from the system.IdleTime() function, don't know why but anything I tried returned an error message.
I was going to look at submitting the code ... just need to read the wiki and figure how I do that
As an aside, how
do you query the system.idletime?