summaryrefslogtreecommitdiffstats
path: root/module/plugins
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2010-11-14 17:15:41 +0100
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2010-11-14 17:15:41 +0100
commit370556b5488621053d26d82a26eb550b95ec40ac (patch)
treefc4a45bfd19f91a59d8ad4e5f5c1105e7809cfee /module/plugins
parentFileServ fix (diff)
downloadpyload-370556b5488621053d26d82a26eb550b95ec40ac.tar.xz
hotfolder linklist fix
Diffstat (limited to 'module/plugins')
-rw-r--r--module/plugins/container/LinkList.py1
-rw-r--r--module/plugins/hooks/HotFolder.py13
2 files changed, 7 insertions, 7 deletions
diff --git a/module/plugins/container/LinkList.py b/module/plugins/container/LinkList.py
index 2bbe905c1..1ddc4ef0e 100644
--- a/module/plugins/container/LinkList.py
+++ b/module/plugins/container/LinkList.py
@@ -49,7 +49,6 @@ class LinkList(Container):
if self.getConfig("clear"):
try:
txt = open(pyfile.url, 'wb')
- txt.write("")
txt.close()
except:
self.log.warning(_("LinkList could not be cleared."))
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)