summaryrefslogtreecommitdiffstats
path: root/module/web
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-06-12 22:40:48 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-06-12 22:40:48 +0200
commit87521d7141c73c9b262c963a5b03c4994482240a (patch)
tree5a9ba061539b322744536dcf0c431bd74fe72567 /module/web
parentRelinkUs, ShareLinksBiz, BitshareCom little improvements (diff)
downloadpyload-87521d7141c73c9b262c963a5b03c4994482240a.tar.xz
fixes for windows
Diffstat (limited to 'module/web')
-rw-r--r--module/web/ServerThread.py9
-rw-r--r--module/web/pyload_app.py17
2 files changed, 19 insertions, 7 deletions
diff --git a/module/web/ServerThread.py b/module/web/ServerThread.py
index d4992572d..98a018844 100644
--- a/module/web/ServerThread.py
+++ b/module/web/ServerThread.py
@@ -1,6 +1,8 @@
#!/usr/bin/env python
from __future__ import with_statement
from os.path import exists
+
+import os
import threading
import logging
@@ -55,9 +57,14 @@ class WebServer(threading.Thread):
log.warning(_("You need to download and compile bjoern, https://github.com/jonashaag/bjoern"))
log.warning(_("Copy the boern.so to module/lib folder or use setup.py install"))
log.warning(_("Of course you need to be familiar with linux and know how to compile software"))
- log.warning(_("in order to do this, but its worth the effort."))
self.server = "builtin"
+ if os.name == "nt":
+ self.core.log.info(_("Server set to threaded, due to known performance problems on windows."))
+ self.core.config.set['webinterface']['server'] = "threaded"
+ self.server = "threaded"
+
+
if self.server == "fastcgi":
self.start_fcgi()
elif self.server == "threaded":
diff --git a/module/web/pyload_app.py b/module/web/pyload_app.py
index 7857f2207..33ad6612f 100644
--- a/module/web/pyload_app.py
+++ b/module/web/pyload_app.py
@@ -323,8 +323,8 @@ def config():
data["limitdl"] = "0"
return render_to_response('settings.html',
- {'conf': {'plugin': plugin_menu, 'general': conf_menu, 'accs': accs}},
- [pre_processor])
+ {'conf': {'plugin': plugin_menu, 'general': conf_menu, 'accs': accs}},
+ [pre_processor])
@route("/package_ui.js")
@@ -431,8 +431,8 @@ def path(file="", path=""):
files = sorted(files, key=itemgetter('type', 'sort'))
return render_to_response('pathchooser.html',
- {'cwd': cwd, 'files': files, 'parentdir': parentdir, 'type': type, 'oldfile': oldfile,
- 'absolute': abs}, [])
+ {'cwd': cwd, 'files': files, 'parentdir': parentdir, 'type': type, 'oldfile': oldfile,
+ 'absolute': abs}, [])
@route("/logs")
@@ -519,7 +519,7 @@ def logs(item=-1):
'reversed': reversed, 'perpage': perpage, 'perpage_p': sorted(perpage_p),
'iprev': 1 if item - perpage < 1 else item - perpage,
'inext': (item + perpage) if item + perpage < len(log) else item},
- [pre_processor])
+ [pre_processor])
@route("/admin")
@@ -596,8 +596,13 @@ def setup():
def info():
conf = PYLOAD.get_config()
+ if hasattr(os, "uname"):
+ extra = os.uname()
+ else:
+ extra = tuple()
+
data = {"python": sys.version,
- "os": " ".join((os.name,) + os.uname()),
+ "os": " ".join((os.name, sys.platform) + extra),
"version": PYLOAD.get_server_version(),
"folder": abspath(PYLOAD_DIR), "config": abspath(""),
"download": abspath(conf["general"]["download_folder"]["value"]),