From 3dd3a1253018ef21db08e8116ea6eb5166826f86 Mon Sep 17 00:00:00 2001 From: Stefano Date: Sat, 22 Jun 2013 16:41:09 +0200 Subject: HotFolder: see http://forum.pyload.org/viewtopic.php?f=13&t=2735 --- module/plugins/hooks/HotFolder.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'module') diff --git a/module/plugins/hooks/HotFolder.py b/module/plugins/hooks/HotFolder.py index ee1031ad5..21ed5ef8e 100644 --- a/module/plugins/hooks/HotFolder.py +++ b/module/plugins/hooks/HotFolder.py @@ -30,7 +30,7 @@ from module.plugins.Hook import Hook class HotFolder(Hook): __name__ = "HotFolder" - __version__ = "0.1" + __version__ = "0.2" __description__ = """observe folder and file for changes and add container and links""" __config__ = [ ("activated", "bool", "Activated" , "False"), ("folder", "str", "Folder to observe", "container"), @@ -46,7 +46,7 @@ class HotFolder(Hook): def periodical(self): - if not exists(join(self.getConfig("folder"), "finished")): + if self.getConfig("keep") and not exists(join(self.getConfig("folder"), "finished")): makedirs(join(self.getConfig("folder"), "finished")) if self.getConfig("watch_file"): @@ -82,4 +82,4 @@ class HotFolder(Hook): self.log.info(_("Added %s from HotFolder") % f) self.core.api.addPackage(f, [newpath], 1) - \ No newline at end of file + -- cgit v1.2.3