summaryrefslogtreecommitdiffstats
path: root/module/web/ajax/views.py
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2010-01-11 22:16:31 +0100
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2010-01-11 22:16:31 +0100
commit9bff9c69d6983dc190c189647821e12d0f134883 (patch)
tree163804a40136bb0d76b5b375a1ac83df212b775e /module/web/ajax/views.py
parentedited wrong file in last commit (diff)
downloadpyload-9bff9c69d6983dc190c189647821e12d0f134883.tar.xz
finally and officially: webinterface home page working ;)
Diffstat (limited to 'module/web/ajax/views.py')
-rw-r--r--module/web/ajax/views.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/module/web/ajax/views.py b/module/web/ajax/views.py
index 952fbe2eb..08d87c30e 100644
--- a/module/web/ajax/views.py
+++ b/module/web/ajax/views.py
@@ -38,8 +38,7 @@ class JsonResponse(HttpResponse):
def add_package(request):
name = request.POST['add_name']
-
- if name is None or "":
+ if name == None or name == "":
return HttpResponseServerError()
links = request.POST['add_links'].split("\n")
@@ -72,7 +71,12 @@ def status(request):
@permission('pyload.can_see_dl')
def links(request):
try:
- return JsonResponse(settings.PYLOAD.status_downloads())
+ links = settings.PYLOAD.status_downloads()
+ ids = map(lambda x: x['id'], links)
+ data = {}
+ data['links'] = links
+ data['ids'] = ids
+ return JsonResponse(data)
except:
return HttpResponseServerError()