summaryrefslogtreecommitdiffstats
path: root/module/web
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-07-24 14:27:03 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-07-24 14:27:03 +0200
commitb58412ba3defe8976c3518fb9218196e609e8f4d (patch)
treee884496e31cdc3250b566c524832e2aae5b3dd56 /module/web
parentclosed #367 (diff)
downloadpyload-b58412ba3defe8976c3518fb9218196e609e8f4d.tar.xz
new locale
Diffstat (limited to 'module/web')
-rw-r--r--module/web/cnl_app.py15
1 files changed, 9 insertions, 6 deletions
diff --git a/module/web/cnl_app.py b/module/web/cnl_app.py
index 22be426de..13ddab1ef 100644
--- a/module/web/cnl_app.py
+++ b/module/web/cnl_app.py
@@ -36,10 +36,13 @@ def flash(id="0"):
@route("/flash/add", method="POST")
@local_check
def add(request):
- package = request.POST.get('referer', 'ClickAndLoad Package')
+ package = request.POST.get('referer', None)
urls = filter(lambda x: x != "", request.POST['urls'].split("\n"))
- PYLOAD.addPackage(package, urls, 0)
+ if package:
+ PYLOAD.addPackage(package, urls, 0)
+ else:
+ PYLOAD.generateAndAddPackages(urls, 0)
return ""
@@ -66,7 +69,7 @@ def addcrypted():
@local_check
def addcrypted2():
- package = request.forms.get("source", "ClickAndLoad Package")
+ package = request.forms.get("source", None)
crypted = request.forms["crypted"]
jk = request.forms["jk"]
@@ -102,7 +105,7 @@ def addcrypted2():
result = filter(lambda x: x != "", result)
try:
- if package != "ClickAndLoad Package":
+ if package:
PYLOAD.addPackage(package, result, 0)
else:
PYLOAD.generateAndAddPackages(result, 0)
@@ -118,11 +121,11 @@ def flashgot(request):
return HTTPError()
autostart = int(request.forms.get('autostart', 0))
- package = request.forms.get('package', "FlashGot")
+ package = request.forms.get('package', None)
urls = filter(lambda x: x != "", request.forms['urls'].split("\n"))
folder = request.forms.get('dir', None)
- if package != "FlashGot":
+ if package:
PYLOAD.addPackage(package, urls, autostart)
else:
PYLOAD.generateAndAddPackages(urls, autostart)