summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--module/plugins/container/LinkList.py1
-rw-r--r--module/plugins/hooks/HotFolder.py13
-rwxr-xr-xpyLoadCore.py6
3 files changed, 10 insertions, 10 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)
diff --git a/pyLoadCore.py b/pyLoadCore.py
index 2c643e16b..c5669c496 100755
--- a/pyLoadCore.py
+++ b/pyLoadCore.py
@@ -287,6 +287,8 @@ class Core(object):
self.do_restart = False
self.shuttedDown = False
+ self.writePidFile()
+
self.log.info(_("Using home directory: %s") % getcwd())
#@TODO refractor
@@ -366,9 +368,7 @@ class Core(object):
f.close()
self.scheduler.addJob(0, self.accountManager.getAccountInfos)
-
- self.writePidFile()
-
+
while True:
sleep(2)
if self.do_restart: