diff options
Diffstat (limited to 'module/web/ajax/views.py')
-rw-r--r-- | module/web/ajax/views.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/module/web/ajax/views.py b/module/web/ajax/views.py index f96b93b70..5a6fc7b69 100644 --- a/module/web/ajax/views.py +++ b/module/web/ajax/views.py @@ -278,6 +278,20 @@ def move_package(request, dest, id): return HttpResponseServerError() @permission('pyload.can_add_dl') +def edit_package(request): + try: + id = int(request.POST.get("pack_id")) + data = {"name": request.POST.get("pack_name"), + "folder": request.POST.get("pack_folder"), + "priority": request.POST.get("pack_prio"), + "password": request.POST.get("pack_pws")} + + settings.PYLOAD.set_package_data(id, data) + + except: + return HttpResponseServerError() + +@permission('pyload.can_add_dl') def set_captcha(request): if request.META['REQUEST_METHOD'] == "POST": try: |