summaryrefslogtreecommitdiffstats
path: root/pyload
diff options
context:
space:
mode:
authorGravatar Armin <Armin@Armin-PC.diedering.lan> 2015-04-08 21:49:45 +0200
committerGravatar Armin <Armin@Armin-PC.diedering.lan> 2015-04-08 21:49:45 +0200
commitc19e6e249c839d127d2cd6ae70ec5be909b2184e (patch)
tree97de200f5430c80bb2f22ba6c92e450e50acf369 /pyload
parentfix setup (diff)
parentMerge pull request #1 from vuolter/0.4.10 (diff)
downloadpyload-c19e6e249c839d127d2cd6ae70ec5be909b2184e.tar.xz
Merge remote-tracking branch 'origin/0.4.10' into 0.4.10
Diffstat (limited to 'pyload')
-rwxr-xr-xpyload/Core.py4
-rw-r--r--pyload/config/Setup.py8
-rw-r--r--pyload/config/default.conf2
-rw-r--r--pyload/manager/thread/Server.py10
-rw-r--r--pyload/network/HTTPRequest.py3
-rw-r--r--pyload/webui/__init__.py4
-rw-r--r--pyload/webui/themes/Next/tml/queue.html12
-rw-r--r--pyload/webui/themes/Next/tml/settings.html41
8 files changed, 40 insertions, 44 deletions
diff --git a/pyload/Core.py b/pyload/Core.py
index 9588c9485..0cc10df6e 100755
--- a/pyload/Core.py
+++ b/pyload/Core.py
@@ -444,7 +444,7 @@ class Core(object):
self.db.manager = self.files #ugly?
def init_webserver(self):
- if self.config['webinterface']['activated']:
+ if self.config['webui']['activated']:
self.webserver = WebServer(self)
self.webserver.start()
@@ -547,7 +547,7 @@ class Core(object):
def shutdown(self):
self.log.info(_("shutting down..."))
try:
- if self.config['webinterface']['activated'] and hasattr(self, "webserver"):
+ if self.config['webui']['activated'] and hasattr(self, "webserver"):
self.webserver.quit()
for thread in list(self.threadManager.threads):
diff --git a/pyload/config/Setup.py b/pyload/config/Setup.py
index 835a2978b..3ce35bfe1 100644
--- a/pyload/config/Setup.py
+++ b/pyload/config/Setup.py
@@ -326,8 +326,8 @@ class SetupAssistant(object):
print
print _("Listen address, if you use 127.0.0.1 or localhost, the webinterface will only accessible locally.")
- self.config.set("webinterface", "host", self.ask(_("Address"), "0.0.0.0"))
- self.config.set("webinterface", "port", self.ask(_("Port"), "8000"))
+ self.config.set("webui", "host", self.ask(_("Address"), "0.0.0.0"))
+ self.config.set("webui", "port", self.ask(_("Port"), "8000"))
print
print _("pyLoad offers several server backends, now following a short explanation.")
print "- auto:", _("Automatically choose the best webserver for your platform.")
@@ -347,7 +347,7 @@ class SetupAssistant(object):
else:
servers = ["auto", "builtin", "threaded", "fastcgi", "lightweight"]
- self.config.set("webinterface", "server", self.ask(_("Choose webserver"), "auto", servers))
+ self.config.set("webui", "server", self.ask(_("Choose webserver"), "auto", servers))
def conf_ssl(self):
@@ -363,7 +363,7 @@ class SetupAssistant(object):
ssl = self.ask(_("Activate SSL?"), self.yes, bool=True)
self.config.set("remote", "ssl", ssl)
- self.config.set("webinterface", "ssl", ssl)
+ self.config.set("webui", "ssl", ssl)
def set_user(self):
diff --git a/pyload/config/default.conf b/pyload/config/default.conf
index cfbd25968..d4b3fd493 100644
--- a/pyload/config/default.conf
+++ b/pyload/config/default.conf
@@ -9,7 +9,7 @@ ssl - "SSL":
bool activated : "Activated"= False
file cert : "SSL Certificate" = ssl.crt
file key : "SSL Key" = ssl.key
-webinterface - "Web UI":
+webui - "Web UI":
bool activated : "Activated" = True
builtin;threaded;fastcgi;lightweight server : "Server" = builtin
bool https : "Use HTTPS" = False
diff --git a/pyload/manager/thread/Server.py b/pyload/manager/thread/Server.py
index 76b9efda8..5962981e8 100644
--- a/pyload/manager/thread/Server.py
+++ b/pyload/manager/thread/Server.py
@@ -20,12 +20,12 @@ class WebServer(threading.Thread):
self.core = pycore
core = pycore
self.running = True
- self.server = pycore.config['webinterface']['server']
- self.https = pycore.config['webinterface']['https']
+ self.server = pycore.config['webui']['server']
+ self.https = pycore.config['webui']['https']
self.cert = pycore.config["ssl"]["cert"]
self.key = pycore.config["ssl"]["key"]
- self.host = pycore.config['webinterface']['host']
- self.port = pycore.config['webinterface']['port']
+ self.host = pycore.config['webui']['host']
+ self.port = pycore.config['webui']['port']
self.setDaemon(True)
@@ -66,7 +66,7 @@ class WebServer(threading.Thread):
self.server = "builtin"
else:
self.core.log.info(_("Server set to threaded, due to known performance problems on windows."))
- self.core.config['webinterface']['server'] = "threaded"
+ self.core.config['webui']['server'] = "threaded"
self.server = "threaded"
if self.server == "threaded":
diff --git a/pyload/network/HTTPRequest.py b/pyload/network/HTTPRequest.py
index b1352bd6b..49d1d042e 100644
--- a/pyload/network/HTTPRequest.py
+++ b/pyload/network/HTTPRequest.py
@@ -74,7 +74,8 @@ class HTTPRequest(object):
#self.c.setopt(pycurl.VERBOSE, 1)
self.c.setopt(pycurl.USERAGENT,
- "Mozilla/5.0 (Windows NT 6.1; Win64; x64;en; rv:5.0) Gecko/20110619 Firefox/5.0")
+ "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:37.0) Gecko/20100101 Firefox/37.0")
+
if pycurl.version_info()[7]:
self.c.setopt(pycurl.ENCODING, "gzip, deflate")
self.c.setopt(pycurl.HTTPHEADER, ["Accept: */*",
diff --git a/pyload/webui/__init__.py b/pyload/webui/__init__.py
index 1310c629d..d965db3a0 100644
--- a/pyload/webui/__init__.py
+++ b/pyload/webui/__init__.py
@@ -39,10 +39,10 @@ else:
config = Server.core.config
JS = JsEngine(Server.core)
-THEME = config.get('webinterface', 'theme')
+THEME = config.get('webui', 'theme')
DL_ROOT = config.get('general', 'download_folder')
LOG_ROOT = config.get('log', 'log_folder')
-PREFIX = config.get('webinterface', 'prefix')
+PREFIX = config.get('webui', 'prefix')
if PREFIX:
PREFIX = PREFIX.rstrip("/")
diff --git a/pyload/webui/themes/Next/tml/queue.html b/pyload/webui/themes/Next/tml/queue.html
index 6f50d740c..265cdfbe1 100644
--- a/pyload/webui/themes/Next/tml/queue.html
+++ b/pyload/webui/themes/Next/tml/queue.html
@@ -52,16 +52,16 @@ document.addEvent("domready", function(){
</div>
{% set progress = (package.linksdone * 100) / package.linkstotal %}
- <div id="progress" class="progress" style="float:left; width: 50%; margin-top: -5px;">
- <div class="progress-bar" role="progressbar" style="width: {{ progress }}%; height: 100%;">
- <label>
- {{ package.linksdone }} / {{ package.linkstotal }}</label>
+ <div id="progress" class="progress" style="float:left; width: 50%; margin-top: -5px; color:#fff; font-weight: 700; font-size:12px;">
+ <div class="progress-bar" role="progressbar" style="width: {{ progress }}%; height: 100%; position: relative; z-index: 1;">
+ <label>{{ package.linksdone }} / {{ package.linkstotal }}</label>
</div>
- <label style="padding-right: 5px ;float: right;">
- {{ package.sizedone|formatsize }} / {{ package.sizetotal|formatsize }}</label>
+ <label style="right: 30px; position: absolute; z-index: 2; color:#fff;">
+ {{ package.sizedone|formatsize }} / {{ package.sizetotal|formatsize }}</label>
</div>
<div style="clear: both; margin-bottom: -10px"></div>
+
<div id="children_{{package.pid}}" style="display: none; margin-bottom: 15px;" class="children">
<span class="child_secrow" style="margin-bottom: 30px; margin-top: 5px;">{{_("Folder:")}} <span class="folder">{{package.folder}}</span> | {{_("Password:")}} <span class="password">{{package.password}}</span></span>
<ul id="sort_children_{{package.pid}}" style="list-style: none; padding-left: 0">
diff --git a/pyload/webui/themes/Next/tml/settings.html b/pyload/webui/themes/Next/tml/settings.html
index 6d097f49d..805340057 100644
--- a/pyload/webui/themes/Next/tml/settings.html
+++ b/pyload/webui/themes/Next/tml/settings.html
@@ -28,17 +28,14 @@
<ul class="nav tabs" style="width: 20%; float:left;">
<li class>
<div class="panel panel-default" >
- <div class="panel-body" style="overlow-y: scroll; ">
-
-
- <ul id="general-menu" style=" float: left;">
- {% for entry,name in conf.general %}
- <nobr>
- <li style="list-style-type: none;" id="general|{{ entry }}">{{ name }}</li>
- </nobr>
- <br>
- {% endfor %}
- </ul>
+ <div class="panel-body">
+ <ul id="general-menu" style="float: left; height: 600px; overflow: auto; overflow-x: hidden; width: 100%">
+ {% for entry,name in conf.general %}
+ <nobr>
+ <li style="list-style-type: none; cursor: pointer; margin-top: 10px;" id="general|{{ entry }}">{{ name }}</li>
+ </nobr>
+ {% endfor %}
+ </ul>
</div>
</div>
</li>
@@ -59,18 +56,16 @@
<span id="plugins" class="tabContent">
<ul class="nav tabs" style="width: 20%; float:left; hight:300px;">
<li class>
- <div class="panel panel-default" style="overflow-y: scroll; ">
- <div class="panel-body" >
-
- <ul id="plugin-menu" style=" float: left;">
- {% for entry,name in conf.plugin %}
- <nobr>
- <li style="list-style-type: none;" id="plugin|{{ entry }}">{{ name }}</li>
- </nobr>
- <br>
- {% endfor %}
- </ul>
- <div>
+ <div class="panel panel-default">
+ <div class="panel-body">
+ <ul id="plugin-menu" style="float: left; height: 600px; overflow: auto; overflow-x: hidden; width: 100%">
+ {% for entry,name in conf.plugin %}
+ <nobr>
+ <li style="list-style-type: none; cursor: pointer; margin-top: 10px;" id="plugin|{{ entry }}">{{ name }}</li>
+ </nobr>
+ {% endfor %}
+ </ul>
+ <div>
</div>
</li>
</ul>