summaryrefslogtreecommitdiffstats
path: root/module/web/ajax
diff options
context:
space:
mode:
Diffstat (limited to 'module/web/ajax')
-rw-r--r--module/web/ajax/urls.py1
-rw-r--r--module/web/ajax/views.py8
2 files changed, 9 insertions, 0 deletions
diff --git a/module/web/ajax/urls.py b/module/web/ajax/urls.py
index d50e7121e..dd68729eb 100644
--- a/module/web/ajax/urls.py
+++ b/module/web/ajax/urls.py
@@ -26,4 +26,5 @@ urlpatterns = patterns('ajax',
(r'^restart_package/(\d+)$', 'views.restart_package'),
(r'^remove_link/(\d+)$', 'views.remove_link'),
(r'^restart_link/(\d+)$', 'views.restart_link'),
+ (r'^push_to_queue/(\d+)$', 'views.push_to_queue'),
) \ No newline at end of file
diff --git a/module/web/ajax/views.py b/module/web/ajax/views.py
index 4d9762ab4..d00c283f1 100644
--- a/module/web/ajax/views.py
+++ b/module/web/ajax/views.py
@@ -193,4 +193,12 @@ def abort_link(request, id):
settings.PYLOAD.stop_download("link", int(id))
return JsonResponse("sucess")
except:
+ return HttpResponseServerError()
+
+@permission('pyload.can_add_dl')
+def push_to_queue(request, id):
+ try:
+ settings.PYLOAD.push_package_2_queue(int(id))
+ return JsonResponse("sucess")
+ except:
return HttpResponseServerError() \ No newline at end of file