summaryrefslogtreecommitdiffstats
path: root/module/web/ajax/views.py
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2010-09-14 14:07:49 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2010-09-14 14:07:49 +0200
commit71467f2866e96cdbe911cd9996305b7e83eef2a2 (patch)
treee72c3fb58981533f3740a736947840a5cc7a3ed5 /module/web/ajax/views.py
parentreverted, closed #129 (diff)
downloadpyload-71467f2866e96cdbe911cd9996305b7e83eef2a2.tar.xz
link ordering for webif
Diffstat (limited to 'module/web/ajax/views.py')
-rw-r--r--module/web/ajax/views.py15
1 files changed, 13 insertions, 2 deletions
diff --git a/module/web/ajax/views.py b/module/web/ajax/views.py
index f020a8303..f96b93b70 100644
--- a/module/web/ajax/views.py
+++ b/module/web/ajax/views.py
@@ -216,6 +216,17 @@ def package_order(request, ids):
except:
print_exc()
return HttpResponseServerError()
+
+@permission('pyload.can_add_dl')
+def link_order(request, ids):
+ try:
+ pid, pos = ids.split("|")
+ settings.PYLOAD.order_file(int(pid), int(pos))
+ return JsonResponse("sucess")
+ except:
+ print_exc()
+ return HttpResponseServerError()
+
@permission('pyload.can_see_dl')
def link(request, id):
try:
@@ -259,9 +270,9 @@ def abort_link(request, id):
return HttpResponseServerError()
@permission('pyload.can_add_dl')
-def push_to_queue(request, id):
+def move_package(request, dest, id):
try:
- settings.PYLOAD.push_package_to_queue(int(id))
+ settings.PYLOAD.move_package(int(dest), int(id))
return JsonResponse("sucess")
except:
return HttpResponseServerError()