From f0914124436b8f66d296ef0d3d0e0f289f5a1aa6 Mon Sep 17 00:00:00 2001 From: RaNaN Date: Fri, 22 Jan 2010 19:21:59 +0100 Subject: some final tweaks --- module/thread_list.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'module/thread_list.py') diff --git a/module/thread_list.py b/module/thread_list.py index c8580fece..9211c7c2e 100644 --- a/module/thread_list.py +++ b/module/thread_list.py @@ -40,7 +40,8 @@ class Thread_List(object): self.reconnecting = False self.select_thread() - self.speedManager = self.SpeedManager(self) + if self.parent.config['general']['download_speed_limit'] != 0: + self.speedManager = self.SpeedManager(self) def create_thread(self): """ creates thread for Py_Load_File and append thread to self.threads @@ -69,12 +70,10 @@ class Thread_List(object): self.lock.acquire() pyfile = None - for f in self.list.getDownloadList(): - if not f.modul.__name__ in self.occ_plugins: - pyfile = f - break + pyfiles = self.list.getDownloadList(self.occ_plugins) - if pyfile: + if pyfiles: + pyfile = pyfiles[0] self.py_downloading.append(pyfile) self.parent.hookManager.downloadStarts(pyfile) if not pyfile.plugin.multi_dl: -- cgit v1.2.3