diff options
Diffstat (limited to 'module/web/ajax')
| -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')  | 
