From 9bff9c69d6983dc190c189647821e12d0f134883 Mon Sep 17 00:00:00 2001 From: RaNaN Date: Mon, 11 Jan 2010 22:16:31 +0100 Subject: finally and officially: webinterface home page working ;) --- module/web/ajax/views.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'module/web/ajax/views.py') 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() -- cgit v1.2.3