diff options
author | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-07-29 06:01:58 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-07-29 06:01:58 +0200 |
commit | 5181a04839f700f482fabed842b2ea0150b2c21d (patch) | |
tree | 2babd18d2b77a640b23a144ba11aa4280002ceea /module | |
parent | New plugin: AntiStandby (diff) | |
download | pyload-5181a04839f700f482fabed842b2ea0150b2c21d.tar.xz |
[AntiStandby] Hotfix
Diffstat (limited to 'module')
-rw-r--r-- | module/plugins/hooks/AntiStandby.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/module/plugins/hooks/AntiStandby.py b/module/plugins/hooks/AntiStandby.py index 4a1155274..4a542953e 100644 --- a/module/plugins/hooks/AntiStandby.py +++ b/module/plugins/hooks/AntiStandby.py @@ -12,7 +12,7 @@ try: except ImportError: pass -from module.plugins.Addon import Addon, Expose +from module.plugins.internal.Addon import Addon, Expose class Kernel32(object): @@ -26,7 +26,7 @@ class Kernel32(object): class AntiStandby(Addon): __name__ = "AntiStandby" __type__ = "hook" - __version__ = "0.01" + __version__ = "0.02" __status__ = "testing" __config__ = [("activated", "bool", "Activated" , True ), @@ -50,12 +50,12 @@ class AntiStandby(Addon): def activate(self): hdd = self.get_config('hdd') - system = self.get_config('system') - display = self.get_config('display') + system = not self.get_config('system') + display = not self.get_config('display') if hdd: self.interval = max(self.get_config('interval'), self.MIN_INTERVAL) - self.init_periodical(self, threaded=True) + self.init_periodical(threaded=True) if os.name == "nt": self.win_standby(system, display) @@ -85,7 +85,7 @@ class AntiStandby(Addon): @Expose - def win_standby(system=True, display=True): + def win_standby(self, system=True, display=True): import ctypes set = ctypes.windll.kernel32.SetThreadExecutionState @@ -103,7 +103,7 @@ class AntiStandby(Addon): @Expose - def osx_standby(system=True, display=True): + def osx_standby(self, system=True, display=True): try: if system: caffeine.off() @@ -119,7 +119,7 @@ class AntiStandby(Addon): @Expose - def linux_standby(system=True, display=True): + def linux_standby(self, system=True, display=True): try: if display: subprocess.call(["xset", "+dpms", "s", "default"]) |