diff options
author | 2015-08-02 10:34:44 +0200 | |
---|---|---|
committer | 2015-08-02 10:34:44 +0200 | |
commit | 1fbaa17324b8f16dcaf0eb78f2a8aa017ec57881 (patch) | |
tree | 2c702d4743cce0bbee4fef45ddd52e038e1f060a /module/plugins/hooks | |
parent | Fix https://github.com/pyload/pyload/issues/1650 (diff) | |
download | pyload-1fbaa17324b8f16dcaf0eb78f2a8aa017ec57881.tar.xz |
Fix https://github.com/pyload/pyload/issues/1651
Diffstat (limited to 'module/plugins/hooks')
-rw-r--r-- | module/plugins/hooks/AntiStandby.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/module/plugins/hooks/AntiStandby.py b/module/plugins/hooks/AntiStandby.py index 4b35c787a..699ecbbde 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 save_join as fs_join +from module.utils import save_join as fs_encode, fs_join class Kernel32(object): @@ -27,7 +27,7 @@ class Kernel32(object): class AntiStandby(Addon): __name__ = "AntiStandby" __type__ = "hook" - __version__ = "0.09" + __version__ = "0.10" __status__ = "testing" __config__ = [("activated", "bool", "Activated" , True ), @@ -155,7 +155,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(path, topdown=False) + for root, dirs, files in os.walk(fs_encode(path), topdown=False) for file in files)) @@ -168,8 +168,8 @@ class AntiStandby(Addon): not self.pyload.threadManager.getActiveFiles()): return - path = self.pyload.config.get("general", "download_folder") - if (self.max_mtime(path) - self.mtime) < self.interval: + download_folder = self.pyload.config.get("general", "download_folder") + if (self.max_mtime(download_folder) - self.mtime) < self.interval: return self.touch(self.TMP_FILE) |