diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2010-11-14 17:15:41 +0100 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2010-11-14 17:15:41 +0100 |
commit | 370556b5488621053d26d82a26eb550b95ec40ac (patch) | |
tree | fc4a45bfd19f91a59d8ad4e5f5c1105e7809cfee /module/plugins/hooks/HotFolder.py | |
parent | FileServ fix (diff) | |
download | pyload-370556b5488621053d26d82a26eb550b95ec40ac.tar.xz |
hotfolder linklist fix
Diffstat (limited to 'module/plugins/hooks/HotFolder.py')
-rw-r--r-- | module/plugins/hooks/HotFolder.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/module/plugins/hooks/HotFolder.py b/module/plugins/hooks/HotFolder.py index 6c6825954..2e210c8a2 100644 --- a/module/plugins/hooks/HotFolder.py +++ b/module/plugins/hooks/HotFolder.py @@ -57,14 +57,15 @@ class HotFolder(Hook): f = open(self.getConfig("file"), "rb") - urls = [x.strip() for x in f.readlines() if x.strip()] + content = f.read().strip() f.close() - if urls: - name = "%s @ %s" % (self.getConfig("file"), time.strftime("%H:%M:%S %d%b%Y") ) - f = open(self.getConfig("file"), "wb") + if content: + name = "%s_%s.txt" % (self.getConfig("file"), time.strftime("%H-%M-%S %d%b%Y") ) + + f = open(join(self.getConfig("folder"), name), "wb") f.close() - - self.core.server_methods.add_package(f.name, urls, 1) + + self.core.server_methods.add_package(f.name, [f.name], 1) for f in listdir(self.getConfig("folder")): path = join(self.getConfig("folder"), f) |