summaryrefslogtreecommitdiffstats
path: root/pyLoadCore.py
diff options
context:
space:
mode:
authorGravatar mkaay <mkaay@mkaay.de> 2009-12-27 14:45:22 +0100
committerGravatar mkaay <mkaay@mkaay.de> 2009-12-27 14:45:22 +0100
commit757f025247d77b085b6168d5f625d2bbfa7c4c0d (patch)
tree5458f45d3c45d6e7da4945a376df8433ccf1e5bf /pyLoadCore.py
parentFixed reconnect loop (easy doing) (diff)
downloadpyload-757f025247d77b085b6168d5f625d2bbfa7c4c0d.tar.xz
stop button works, closes #59
Diffstat (limited to 'pyLoadCore.py')
-rwxr-xr-xpyLoadCore.py15
1 files changed, 14 insertions, 1 deletions
diff --git a/pyLoadCore.py b/pyLoadCore.py
index 5890c6e9a..979abaf44 100755
--- a/pyLoadCore.py
+++ b/pyLoadCore.py
@@ -508,7 +508,20 @@ class ServerMethods():
pid = self.core.file_list.packager.addNewPackage(filename)
cid = self.core.file_list.collector.addLink(path)
self.move_file_2_package(cid, pid)
- self.core.file_list.save()
+ self.core.file_list.save()
+
+ def get_log(self, offset=0):
+ filename = self.core.config['log']['log_folder'] + sep + 'log.txt'
+ fh = open(filename, "r")
+ content = fh.read()
+ fh.close()
+ lines = content.splitlines()
+ if offset >= len(lines):
+ return None
+ return lines[offset:]
+
+ def stop_downloads(self):
+ self.core.thread_list.stopAllDownloads()
#def move_urls_up(self, ids):
# for id in ids: