summaryrefslogtreecommitdiffstats
path: root/module/gui/Queue.py
diff options
context:
space:
mode:
authorGravatar mkaay <mkaay@mkaay.de> 2009-12-26 20:18:11 +0100
committerGravatar mkaay <mkaay@mkaay.de> 2009-12-26 20:18:11 +0100
commit504b313112be6a82d6eee418ae059646ecfc4b30 (patch)
tree88a8ee96d788bd4b3fd7c97775e85787c3709e8a /module/gui/Queue.py
parentclean shutdown (diff)
downloadpyload-504b313112be6a82d6eee418ae059646ecfc4b30.tar.xz
fixed ddl-music, cleaned up, new status (starting), some more fixes
Diffstat (limited to 'module/gui/Queue.py')
-rw-r--r--module/gui/Queue.py15
1 files changed, 13 insertions, 2 deletions
diff --git a/module/gui/Queue.py b/module/gui/Queue.py
index 35e1163b9..f542c9a6b 100644
--- a/module/gui/Queue.py
+++ b/module/gui/Queue.py
@@ -198,10 +198,10 @@ class Queue(QThread):
count = len(children)
speed_sum = 0
all_waiting = True
+ running = False
for child in children:
val = 0
data = child.getData()
- running = False
if data["downloading"]:
if not data["status_type"] == "waiting":
all_waiting = False
@@ -239,7 +239,7 @@ class Queue(QThread):
item = QTreeWidgetItem()
parent.insertChild(pos, item)
speed = self.queue.getSpeed(newChild)
- if speed == None:
+ if speed == None or newChild.getData()["status_type"] == "starting":
status = newChild.getData()["status_type"]
else:
status = "%s (%s KB/s)" % (newChild.getData()["status_type"], speed)
@@ -269,12 +269,23 @@ class Queue(QThread):
def clear(self, ids):
clear = False
+ children = {}
for file in self.getChildren():
if not file.getData()["id"] in ids:
clear = True
break
+ try:
+ children[file.getData()["id"]]
+ clear = True
+ except:
+ children[file.getData()["id"]] = True
+
if not clear:
return
+ ppos = self.queue.queue.index(self)
+ parent = self.queue.view.topLevelItem(ppos)
+ parent.takeChildren()
+ self.children = []
self.queue.queue = []
self.queue.view.emit(SIGNAL("clear"))