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 | |
parent | new ip retrieve (diff) | |
download | pyload-ea60772cf6780de1065645c166bd4149039902bc.tar.xz |
DLC for python 2.7, password in add package dialog
Diffstat (limited to 'module')
-rw-r--r-- | module/plugins/container/DLC_27.pyc | bin | 0 -> 8098 bytes | |||
-rw-r--r-- | module/web/ajax/views.py | 9 | ||||
-rw-r--r-- | module/web/templates/default/window.html | 5 |
3 files changed, 10 insertions, 4 deletions
diff --git a/module/plugins/container/DLC_27.pyc b/module/plugins/container/DLC_27.pyc Binary files differnew file mode 100644 index 000000000..916c13328 --- /dev/null +++ b/module/plugins/container/DLC_27.pyc 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") diff --git a/module/web/templates/default/window.html b/module/web/templates/default/window.html index d40edbb9e..3ed79f876 100644 --- a/module/web/templates/default/window.html +++ b/module/web/templates/default/window.html @@ -18,6 +18,11 @@ </label>
<textarea rows="5" name="add_links" id="add_links"></textarea>
+<label for="add_password">{% trans "Password" %}
+ <span class="small">{% trans "Password for RAR-Archive" %}</span>
+</label>
+<input id="add_password" name="add_password" type="text" size="20">
+
<label>{% trans "File" %}
<span class="small">{% trans "Upload a container." %}</span>
</label>
|