summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--module/CaptchaManager.py2
-rw-r--r--module/web/cnl_app.py6
-rw-r--r--module/web/webinterface.py2
3 files changed, 6 insertions, 4 deletions
diff --git a/module/CaptchaManager.py b/module/CaptchaManager.py
index 99d29f37d..7c851a16e 100644
--- a/module/CaptchaManager.py
+++ b/module/CaptchaManager.py
@@ -128,7 +128,7 @@ class CaptchaTask():
self.status = "shared-user"
def timedOut(self):
- return self.waitUntil >= time()
+ return time() > self.waitUntil
def invalid(self):
""" indicates the captcha was not correct """
diff --git a/module/web/cnl_app.py b/module/web/cnl_app.py
index 058a298d3..34ddc6ac2 100644
--- a/module/web/cnl_app.py
+++ b/module/web/cnl_app.py
@@ -2,6 +2,7 @@
# -*- coding: utf-8 -*-
from os.path import join
import re
+from traceback import print_exc
from urllib import unquote
from base64 import standard_b64decode
from binascii import unhexlify
@@ -27,9 +28,10 @@ def local_check(function):
@route("/flash")
+@route("/flash/:id")
@route("/flash", method="POST")
@local_check
-def flash():
+def flash(id="0"):
return "JDownloader"
@route("/flash/add", method="POST")
@@ -50,7 +52,7 @@ def addcrypted():
dlc = request.forms['crypted'].replace(" ", "+")
dlc_path = join(DL_ROOT, package.replace("/", "").replace("\\", "").replace(":", "") + ".dlc")
- dlc_file = file(dlc_path, "wb")
+ dlc_file = open(dlc_path, "wb")
dlc_file.write(dlc)
dlc_file.close()
diff --git a/module/web/webinterface.py b/module/web/webinterface.py
index 15948666e..52488ea20 100644
--- a/module/web/webinterface.py
+++ b/module/web/webinterface.py
@@ -72,7 +72,7 @@ from module.JsEngine import JsEngine
JS = JsEngine()
TEMPLATE = config.get('webinterface', 'template')
-DL_ROOT = join(PYLOAD_DIR, config.get('general', 'download_folder'))
+DL_ROOT = config.get('general', 'download_folder')
LOG_ROOT = join(PYLOAD_DIR, config.get('log', 'log_folder'))
DEBUG = config.get("general","debug_mode")
bottle.debug(DEBUG)