diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2010-01-17 18:31:52 +0100 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2010-01-17 18:31:52 +0100 |
commit | 8d842efb12ee7db88505e3078b626855e55aa4bf (patch) | |
tree | 54670c428b961f299ec10dd91255f8f17333f7d5 /module/web/ajax/views.py | |
parent | Fixed Shareonline (diff) | |
download | pyload-8d842efb12ee7db88505e3078b626855e55aa4bf.tar.xz |
some fixes, closed #62 ??
Diffstat (limited to 'module/web/ajax/views.py')
-rw-r--r-- | module/web/ajax/views.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/module/web/ajax/views.py b/module/web/ajax/views.py index ea092745f..4f136cef9 100644 --- a/module/web/ajax/views.py +++ b/module/web/ajax/views.py @@ -30,7 +30,7 @@ class JsonResponse(HttpResponse): object, indent=2, cls=json.DjangoJSONEncoder, ensure_ascii=False) super(JsonResponse, self).__init__( - content, content_type='application/json') #@TODO uncomment + content)#, content_type='application/json') #@TODO uncomment self['Cache-Control'] = 'no-cache, must-revalidate' @@ -117,6 +117,12 @@ def unpause(request): return HttpResponseServerError() +@permission('pyload.can_change_status') +def cancel(request): + try: + return JsonResponse(settings.PYLOAD.stop_downloads()) + except: + return HttpResponseServerError() @permission('pyload.can_see_dl') def packages(request): |