Fix: "on-idle" script runs too often unneccessarily #3
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
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.