summaryrefslogtreecommitdiffstats
path: root/module/web
diff options
context:
space:
mode:
Diffstat (limited to 'module/web')
-rw-r--r--module/web/WebServer.py26
-rw-r--r--module/web/templates/default.tpl12
2 files changed, 37 insertions, 1 deletions
diff --git a/module/web/WebServer.py b/module/web/WebServer.py
index 074ab4242..0627132c8 100644
--- a/module/web/WebServer.py
+++ b/module/web/WebServer.py
@@ -111,7 +111,7 @@ def queue():
username = request.COOKIES.get('user')
- return template('default', page='queue', links=core.get_downloads(), user=username, status=core.server_status())
+ return template('default', page='queue', links=core.get_links(), user=username, status=core.server_status())
@route('/downloads')
def downloads():
@@ -191,6 +191,29 @@ def add_links():
return "{}"
+@route('/json/pause')
+def pause():
+ response.header['Cache-Control'] = 'no-cache, must-revalidate'
+ response.content_type = 'application/json'
+
+ if not check_auth(request):
+ abort(404, "No Access")
+
+ core.thread_list.pause = True
+
+ return "{}"
+
+@route('/json/pause')
+def pause():
+ response.header['Cache-Control'] = 'no-cache, must-revalidate'
+ response.content_type = 'application/json'
+
+ if not check_auth(request):
+ abort(404, "No Access")
+
+ core.thread_liste.pause = False
+
+ return "{}"
@route('/favicon.ico')
@@ -245,6 +268,7 @@ class WebServer(threading.Thread):
else:
bottle.debug(False)
+ #@TODO remove
TIME = time.strftime("%a, %d %b %Y %H:%M:%S +0000", time.localtime())
bottle.TEMPLATE_PATH.append('./module/web/templates/%s.tpl')
diff --git a/module/web/templates/default.tpl b/module/web/templates/default.tpl
index 2508455cb..b184f4017 100644
--- a/module/web/templates/default.tpl
+++ b/module/web/templates/default.tpl
@@ -180,6 +180,18 @@ this.morph({'color': '#000', 'padding-left': '0px'});
<b>You were successfully logged in</b>
+%elif page=="queue":
+
+<ul>
+
+%for id in links['order']:
+
+
+<li>{{links[id].url}}</li>
+
+%end
+
+</ul>
%end