summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2009-06-12 15:36:48 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2009-06-12 15:36:48 +0200
commit979daf6a4daae605b2a39e916c16015437fac98d (patch)
tree7f40809a692548717c778ec723fd1fced09cf539
parentutf-8 encodung, correcting file header (diff)
downloadpyload-979daf6a4daae605b2a39e916c16015437fac98d.tar.xz
little fixes
-rw-r--r--Core.py4
-rw-r--r--module/download_thread.py4
-rw-r--r--module/thread_list.py2
-rwxr-xr-xpyMainGui.py6
4 files changed, 12 insertions, 4 deletions
diff --git a/Core.py b/Core.py
index 1d1114878..1b19d17d9 100644
--- a/Core.py
+++ b/Core.py
@@ -179,9 +179,13 @@ class Core(object):
list = []
for pyfile in self.thread_list.py_downloading:
download = {}
+ download['id'] = pyfile.id
download['name'] = pyfile.status.filename
download['speed'] = pyfile.status.get_speed()
download['eta'] = pyfile.status.get_ETA()
+ download['kbleft'] = pyfile.status.kB_left()
+ download['size'] = pyfile.status.size()
+ download['status'] = pyfile.status.type
list.append(download)
return list
diff --git a/module/download_thread.py b/module/download_thread.py
index f4530c3b3..bb32030a7 100644
--- a/module/download_thread.py
+++ b/module/download_thread.py
@@ -40,7 +40,9 @@ class Status(object):
def get_speed(self):
return self.pyfile.plugin.req.get_speed()
def kB_left(self):
- return self.pyfile.plugins.req.kB_left()
+ return self.pyfile.plugin.req.kB_left()
+ def size(self):
+ return self.pyfile.plugin.req.dl_size / 1024
class Download_Thread(threading.Thread):
diff --git a/module/thread_list.py b/module/thread_list.py
index 850e738db..bfe99c6e2 100644
--- a/module/thread_list.py
+++ b/module/thread_list.py
@@ -32,7 +32,7 @@ class Thread_List(object):
def __init__(self, parent):
self.parent = parent
self.threads = []
- self.max_threads = self.parent.config['max_downloads']
+ self.max_threads = int(self.parent.config['max_downloads'])
self.py_load_files = [] # files in queque
self.f_relation = [0, 0]
self.lock = RLock()
diff --git a/pyMainGui.py b/pyMainGui.py
index d88242826..1342ed8f1 100755
--- a/pyMainGui.py
+++ b/pyMainGui.py
@@ -146,10 +146,12 @@ class Pyload_Main_Gui(wx.Frame):
def onUpdate(self, evt):
if evt.obj.function == "get_downloads":
- self.show_links(evt.obj.response)
+ pass
+ #self.show_links(evt.obj.response)
if evt.obj.command == "update":
- self.show_links(evt.obj.data)
+ pass
+ #self.show_links(evt.obj.data)
app = wx.App()
Pyload_Main_Gui(None, -1)