summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--module/plugins/hooks/AntiStandby.py10
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)