From 570f37674434c7f3816e3949967c31407610da6c Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Thu, 8 Oct 2015 06:32:02 +0200 Subject: Spare improvements --- module/plugins/hooks/AntiStandby.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'module/plugins/hooks/AntiStandby.py') diff --git a/module/plugins/hooks/AntiStandby.py b/module/plugins/hooks/AntiStandby.py index fbb7f6760..aa7a028a5 100644 --- a/module/plugins/hooks/AntiStandby.py +++ b/module/plugins/hooks/AntiStandby.py @@ -27,7 +27,7 @@ class Kernel32(object): class AntiStandby(Addon): __name__ = "AntiStandby" __type__ = "hook" - __version__ = "0.11" + __version__ = "0.12" __status__ = "testing" __config__ = [("activated", "bool", "Activated" , True ), @@ -41,8 +41,9 @@ class AntiStandby(Addon): __authors__ = [("Walter Purcaro", "vuolter@gmail.com")] - TMP_FILE = ".antistandby" - MIN_INTERVAL = 5 + TMP_FILE = ".antistandby" + + PERIODICAL_INTERVAL = 5 def init(self): @@ -56,8 +57,7 @@ class AntiStandby(Addon): display = not self.get_config('display') if hdd: - self.interval = max(self.get_config('interval'), self.MIN_INTERVAL) - self.init_periodical(threaded=True) + self.start_periodical(self.get_config('interval'), threaded=True) if os.name is "nt": self.win_standby(system, display) -- cgit v1.2.3