diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2010-10-19 12:50:26 +0200 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2010-10-19 12:50:26 +0200 |
commit | ea60772cf6780de1065645c166bd4149039902bc (patch) | |
tree | 4ed3aaa0c21d0fdaec8ddb10e837c0c8f993af50 /module/web/ajax/views.py | |
parent | new ip retrieve (diff) | |
download | pyload-ea60772cf6780de1065645c166bd4149039902bc.tar.xz |
DLC for python 2.7, password in add package dialog
Diffstat (limited to 'module/web/ajax/views.py')
-rw-r--r-- | module/web/ajax/views.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/module/web/ajax/views.py b/module/web/ajax/views.py index 603bb993a..f90052b62 100644 --- a/module/web/ajax/views.py +++ b/module/web/ajax/views.py @@ -53,10 +53,9 @@ class JsonResponse(HttpResponse): def add_package(request): name = request.POST['add_name'] - queue = int(request.POST['add_dest']) - links = request.POST['add_links'].split("\n") + pw = request.POST.get("add_password", "").strip("\n\r") try: f = request.FILES['add_file'] @@ -79,8 +78,10 @@ def add_package(request): links = map(lambda x: x.strip(), links) links = filter(lambda x: x != "", links) - - settings.PYLOAD.add_package(name, links, queue) + pack = settings.PYLOAD.add_package(name, links, queue) + if pw: + data = {"password": pw} + settings.PYLOAD.set_package_data(pack, data) return JsonResponse("success") |