From 757f025247d77b085b6168d5f625d2bbfa7c4c0d Mon Sep 17 00:00:00 2001 From: mkaay Date: Sun, 27 Dec 2009 14:45:22 +0100 Subject: stop button works, closes #59 --- pyLoadCore.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'pyLoadCore.py') 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: -- cgit v1.2.3