From 641cd8c63f4c3a96a9acf4d46450ab975b9c66cd Mon Sep 17 00:00:00 2001 From: RaNaN Date: Wed, 20 May 2009 11:05:21 +0000 Subject: Neue Request Klasse eingebunden + ein paar Status Funktionen --- Core.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'Core.py') diff --git a/Core.py b/Core.py index 4093927f4..1a0e3e1ae 100644 --- a/Core.py +++ b/Core.py @@ -33,9 +33,9 @@ from time import sleep, time import pickle #my imports -from download_thread import Download_Thread -from thread_list import Thread_List -from Py_Load_File import PyLoadFile +from module.download_thread import Download_Thread +from module.thread_list import Thread_List +from module.Py_Load_File import PyLoadFile basicConfig(filename='Logs/faild.txt', format = '%(message)s') @@ -216,16 +216,19 @@ class Core(object): def __new_py_load_file(self, url, plugin): - #plugin_name = plugin.__name__ new_file = PyLoadFile(self, plugin, url) new_file.download_folder = self.download_folder self.thread_list.append_py_load_file(new_file) return True def _test_print_status(self): - if len(self.thread_list.threads)>0: + if len(self.thread_list.py_load_files)>0: + for pyfile in self.thread_list.py_load_files: if pyfile.status.type == 'downloading': + print "Speed" ,pyfile.status.getSpeed() + print "ETA" , pyfile.status.getETA() + try: fn = pyfile.status.filename p = round(float(pyfile.status.downloaded_kb)/pyfile.status.total_kb, 2) -- cgit v1.2.3