Python: How to detect that the screensaver is about to start
#1
Hi All,

I would really appreciate some help, I have search but have not managed to find anything :-(

What I would like to do is detect when the screensaver is about to kick in (ideally before it actually does) so that I can stop something in a python add-on.

I can see a message being printed in the log - but I didn't know how to pick up on this. (Ideally I would like a blocking call - so that I can do something before it starts)

Is there any way of doing this?

Thanks, Rob
Reply
#2
http://mirrors.xbmc.org/docs/python-docs...ml#Monitor
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply
#3
(2013-09-30, 15:27)Martijn Wrote: http://mirrors.xbmc.org/docs/python-docs...ml#Monitor

Thankyou!

I can't believe I didn't see that - I was looking through the APIs - those docs have been very useful to a newbie like me!

I notice that this is called when the screensaver starts - is there a way to be called just before it starts - and then block it until I have done some "tidy-up"

Thanks
Rob
Reply
#4
nope
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply
#5
(2013-09-30, 15:36)Martijn Wrote: nope

That's a shame, as I really wanted to be able to stop an audio file playing when the screensaver kicks in. The problem with only being notified after the screensaver has started is that it seems to think stopping the player is user interaction, so imediately cancels the screen saver - and you have to wait for the time-out again.

I would be interested to hear anyones suggestions on how I may be able to work around this.

Thanks, Rob
Reply
#6
The other option I suppose is for me to restart the screensaver after stoping the audio.

I found info on restarting it in Gotham:

http://wiki.xbmc.org/?title=List_of_Built_In_Functions

ActivateScreensaver

But couldn't see a way in Frodo - is it possible to force a start of the screensaver in frodo?

Thanks

Rob
Reply

Logout Mark Read Team Forum Stats Members Help
Python: How to detect that the screensaver is about to start0