summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2009-08-24 16:01:03 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2009-08-24 16:01:03 +0200
commiteb31362ed7d7bdf24acda85915729a686dfbb86e (patch)
treee43f8d7e799a3989a62c1bace978af9f1ac6bb5f
parentUpdated Hoerbuch.in (diff)
downloadpyload-eb31362ed7d7bdf24acda85915729a686dfbb86e.tar.xz
little fixes
-rw-r--r--Plugins/Plugin.py3
-rw-r--r--module/download_thread.py3
-rwxr-xr-xmodule/network/Request.py1
-rw-r--r--module/web/WebServer.py26
-rw-r--r--module/web/templates/default.tpl12
5 files changed, 40 insertions, 5 deletions
diff --git a/Plugins/Plugin.py b/Plugins/Plugin.py
index 945d8ec76..0a7b3ecb2 100644
--- a/Plugins/Plugin.py
+++ b/Plugins/Plugin.py
@@ -54,8 +54,7 @@ class Plugin():
pyfile.status.exists = self.file_exists()
if not pyfile.status.exists:
- #raise Exception, "The file was not found on the server."
- self.logger.info("The file was not found on the server.")
+ raise Exception, "The file was not found on the server."
return False
pyfile.status.filename = self.get_file_name()
diff --git a/module/download_thread.py b/module/download_thread.py
index 27abe919d..36b308217 100644
--- a/module/download_thread.py
+++ b/module/download_thread.py
@@ -76,7 +76,8 @@ class Download_Thread(threading.Thread):
except Reconnect:
pass
except Exception, e:
- traceback.print_exc()
+ if self.parent.parent.config['general']['debug_mode']:
+ traceback.print_exc()
self.loadedPyFile.status.type = "failed"
self.loadedPyFile.status.error = str(e)
finally:
diff --git a/module/network/Request.py b/module/network/Request.py
index 85aa851fe..99c04e055 100755
--- a/module/network/Request.py
+++ b/module/network/Request.py
@@ -8,7 +8,6 @@ authored by: RaNaN
import base64
import cookielib
from gzip import GzipFile
-import re
import time
import urllib
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