pilluli/service.xbmc.callbacks — pull request #3 by cogano (2014-09-17 18:44:51+00:00)
Title: Fix: "on-idle" script runs too often unneccessarily

Hi,

I set the sleep period for the idle script even shorter (to 2 seconds) so that the user does not have to wait too long before XBMC quits (I use the HTPC also as a regular PC).

Running the idle script every few seconds seems to be an unneccessary work load (and the external script fills up syslog quickly).

To keep it short: the new variable "idle_chk_period" allows the user to set interval betwen the launches of the idle script (in minutes).

P.S. I also modified how the idle_time (now idle_timeout) and idle_chk_period are used in the script, because the direct reference in the condition
```python
if xbmc.getGlobalIdleTime() > 60 * __addon__.getSetting("idle_time"):
```
did not work for me at all.

BTW, thnx a lot for the script, I was about to return to MythTV frontend if there was not a way how to set own "idle" script to be launched within XBMC. (It would not be so hard to add an extra setting in the Power Management section, IMHO, I do not understand why it is considered as unusefull by devs). Nevermind, this is a good solution.