From 94aef5b62739afbd6cb27db76896839426ecc282 Mon Sep 17 00:00:00 2001 From: RaNaN Date: Sun, 2 Oct 2011 16:52:09 +0200 Subject: GUI_progressbar_fix.patch by royflo --- module/Api.py | 2 +- module/gui/Queue.py | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/module/Api.py b/module/Api.py index b77cbfb0b..66ba855f1 100644 --- a/module/Api.py +++ b/module/Api.py @@ -472,7 +472,7 @@ class Api(Iface): :return: `PackageData` with .fid attribute """ data = self.core.files.getPackageData(int(pid)) - print data + if not data: raise PackageDoesNotExists(pid) diff --git a/module/gui/Queue.py b/module/gui/Queue.py index 10ff9d84f..5bacab13c 100644 --- a/module/gui/Queue.py +++ b/module/gui/Queue.py @@ -195,7 +195,6 @@ class QueueModel(CollectorModel): since it's used in already locked calls, it provides an option to not lock """ - # TODO when 1 link complete wrong progress state if locked: locker = QMutexLocker(self.mutex) if isinstance(item, Link): @@ -210,8 +209,8 @@ class QueueModel(CollectorModel): perc_sum = 0 for child in item.children: try: - #if child.data["status"] == 13: #processing - # return int(child.data["progress"]) + if child.data["status"] == 0: #completed + perc_sum += 100 perc_sum += int(child.data["downloading"]["percent"]) except: pass -- cgit v1.2.3