diff options
author | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-10-18 18:57:22 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-10-18 18:57:22 +0200 |
commit | 06246da1b087cc99d99ac9e8e3642273971e904c (patch) | |
tree | fbbb998f4594a26b32f4aa109d0a6caaeebd3d84 /module/plugins/hooks/AntiStandby.py | |
parent | Update crypters (diff) | |
download | pyload-06246da1b087cc99d99ac9e8e3642273971e904c.tar.xz |
Update addons
Diffstat (limited to 'module/plugins/hooks/AntiStandby.py')
-rw-r--r-- | module/plugins/hooks/AntiStandby.py | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/module/plugins/hooks/AntiStandby.py b/module/plugins/hooks/AntiStandby.py index aa7a028a5..54db858a3 100644 --- a/module/plugins/hooks/AntiStandby.py +++ b/module/plugins/hooks/AntiStandby.py @@ -13,7 +13,7 @@ except ImportError: pass from module.plugins.internal.Addon import Addon, Expose -from module.utils import fs_encode, save_join as fs_join +from module.plugins.internal.utils import encode, fs_join class Kernel32(object): @@ -43,8 +43,6 @@ class AntiStandby(Addon): TMP_FILE = ".antistandby" - PERIODICAL_INTERVAL = 5 - def init(self): self.pid = None @@ -155,7 +153,7 @@ class AntiStandby(Addon): def max_mtime(self, path): return max(0, 0, *(os.path.getmtime(fs_join(root, file)) - for root, dirs, files in os.walk(fs_encode(path), topdown=False) + for root, dirs, files in os.walk(encode(path), topdown=False) for file in files)) @@ -168,8 +166,8 @@ class AntiStandby(Addon): not self.pyload.threadManager.getActiveFiles()): return - download_folder = self.pyload.config.get("general", "download_folder") - if (self.max_mtime(download_folder) - self.mtime) < self.interval: + dl_folder = self.pyload.config.get("general", "download_folder") + if (self.max_mtime(dl_folder) - self.mtime) < self.interval: return self.touch(self.TMP_FILE) |