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/ajax/views.py | |
parent | more improvements and cleaned some imports (diff) | |
download | pyload-ff21df6b2ccdaf5161351ab69086d358a98c241d.tar.xz |
restart working and client information
Diffstat (limited to 'module/web/ajax/views.py')
-rw-r--r-- | module/web/ajax/views.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/module/web/ajax/views.py b/module/web/ajax/views.py index 558d35415..02c135bfe 100644 --- a/module/web/ajax/views.py +++ b/module/web/ajax/views.py @@ -107,10 +107,10 @@ def links(request): ids = [] for link in links: ids.append(link['id']) - print link['status'] - if link['status'] == 'downloading': + + if link['status'] == 12: link['info'] = "%s @ %s kb/s" % (format_time(link['eta']), round(link['speed'], 2)) - elif link['status'] == 'waiting': + elif link['status'] == 5: link['percent'] = 0 link['size'] = 0 link['kbleft'] = 0 @@ -211,7 +211,7 @@ def restart_package(request, id): try: settings.PYLOAD.restart_package(int(id)) return JsonResponse("sucess") - except: + except Exception: return HttpResponseServerError() @permission('pyload.can_add_dl') @@ -219,7 +219,7 @@ def restart_link(request, id): try: settings.PYLOAD.restart_file(int(id)) return JsonResponse("sucess") - except: + except Exception: return HttpResponseServerError() @permission('pyload.can_add_dl') |