From 035fd57b56b33463c933db15f4ee8a149ddc060f Mon Sep 17 00:00:00 2001 From: mkaay <mkaay@mkaay.de> Date: Mon, 28 Dec 2009 20:03:11 +0100 Subject: tried to satisfy RaNaN --- module/file_list.py | 6 ++++++ pyLoadCore.py | 7 +++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/module/file_list.py b/module/file_list.py index 21e084483..cc3b63006 100644 --- a/module/file_list.py +++ b/module/file_list.py @@ -160,6 +160,12 @@ class File_List(object): info["plugin"] = pyfile.plugin.props['name'] return info + def continueAborted(self): + for pypack in self.data["queue"]: + for pyfile in pypack.files: + if pyfile.status.type == "aborted": + self.packager.resetFileStatus(pyfile.id) + class pyLoadCollector(): def __init__(collector, file_list): collector.file_list = file_list diff --git a/pyLoadCore.py b/pyLoadCore.py index d0a6195d4..52cdf6720 100755 --- a/pyLoadCore.py +++ b/pyLoadCore.py @@ -152,7 +152,9 @@ class Core(object): pid = found lid = self.file_list.collector.addLink(linkFile) self.file_list.packager.addFileToPackage(pid, self.file_list.collector.popFile(lid)) - self.file_list.packager.pushPackage2Queue(pid) + self.file_list.packager.pushPackage2Queue(pid) + + self.file_list.continueAborted() while True: sleep(2) @@ -322,9 +324,10 @@ class Core(object): self.logger.info("shutting down...") self.webserver.quit() self.webserver.join() - self.thread_list.stopAllDownloads() for thread in self.thread_list.threads: thread.shutdown = True + self.thread_list.stopAllDownloads() + for thread in self.thread_list.threads: thread.join(15) self.file_list.save() -- cgit v1.2.3