diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2010-07-29 20:08:07 +0200 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2010-07-29 20:08:07 +0200 |
commit | ff21df6b2ccdaf5161351ab69086d358a98c241d (patch) | |
tree | d958eeb0d78ee6eec38349ed2884bb33ae429e6f /module/web/pyload | |
parent | more improvements and cleaned some imports (diff) | |
download | pyload-ff21df6b2ccdaf5161351ab69086d358a98c241d.tar.xz |
restart working and client information
Diffstat (limited to 'module/web/pyload')
-rw-r--r-- | module/web/pyload/views.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/module/web/pyload/views.py b/module/web/pyload/views.py index 52b58cd03..67ac6c07a 100644 --- a/module/web/pyload/views.py +++ b/module/web/pyload/views.py @@ -67,7 +67,13 @@ def base(request, messages): @permission('pyload.can_see_dl') @check_server def home(request): - return render_to_response(join(settings.TEMPLATE, 'home.html'), RequestContext(request, {'content': settings.PYLOAD.status_downloads()}, [status_proc])) + res = settings.PYLOAD.status_downloads() + + for link in res: + if link["status"] == 12: + link["information"] = "%s kB @ %s kB/s" % (link["size"] - link["kbleft"], link["speed"]) + + return render_to_response(join(settings.TEMPLATE, 'home.html'), RequestContext(request, {'content': res}, [status_proc])) @login_required |