summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--module/plugins/container/DLC_27.pycbin0 -> 8098 bytes
-rw-r--r--module/web/ajax/views.py9
-rw-r--r--module/web/templates/default/window.html5
3 files changed, 10 insertions, 4 deletions
diff --git a/module/plugins/container/DLC_27.pyc b/module/plugins/container/DLC_27.pyc
new file mode 100644
index 000000000..916c13328
--- /dev/null
+++ b/module/plugins/container/DLC_27.pyc
Binary files differ
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>