diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2009-05-20 13:05:21 +0200 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2009-05-20 13:05:21 +0200 |
commit | 641cd8c63f4c3a96a9acf4d46450ab975b9c66cd (patch) | |
tree | a1bf0e74c3bde51d174bc0d154d1f88359437fbc /Core.py | |
parent | Modul struktur angelegt und request klasse eingefügt (diff) | |
download | pyload-641cd8c63f4c3a96a9acf4d46450ab975b9c66cd.tar.xz |
Neue Request Klasse eingebunden + ein paar Status Funktionen
Diffstat (limited to 'Core.py')
-rw-r--r-- | Core.py | 13 |
1 files changed, 8 insertions, 5 deletions
@@ -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) |