summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--module/config/core.xml2
-rw-r--r--module/thread_list.py1
-rw-r--r--module/web/pyload/views.py13
-rw-r--r--module/web/templates/default/base.html4
-rwxr-xr-xpyLoadCore.py23
5 files changed, 25 insertions, 18 deletions
diff --git a/module/config/core.xml b/module/config/core.xml
index 392309e1c..6da85cf32 100644
--- a/module/config/core.xml
+++ b/module/config/core.xml
@@ -11,7 +11,7 @@
<key>ssl.key</key>
</ssl>
<webinterface>
- <activated>False</activated>
+ <activated>True</activated>
<host>0.0.0.0</host>
<port>8000</port>
<template>default</template>
diff --git a/module/thread_list.py b/module/thread_list.py
index 1020f9ce1..52d06aae4 100644
--- a/module/thread_list.py
+++ b/module/thread_list.py
@@ -110,6 +110,7 @@ class Thread_List(object):
newLinks = 0
if pyfile.plugin.links:
for link in pyfile.plugin.links:
+ print link
newFile = self.list.collector.addLink(link)
self.list.packager.addFileToPackage(pyfile.package.data["id"], self.list.collector.popFile(newFile))
newLinks += 1
diff --git a/module/web/pyload/views.py b/module/web/pyload/views.py
index 904e312e7..a51a9c4dc 100644
--- a/module/web/pyload/views.py
+++ b/module/web/pyload/views.py
@@ -51,6 +51,11 @@ def permission(perm):
return _dec
+
+def status_proc(request):
+ return {'status': settings.PYLOAD.status_server()}
+
+
def base(request, messages):
return render_to_response(join(settings.TEMPLATE,'base.html'), {'messages': messages},RequestContext(request))
@@ -58,14 +63,14 @@ def base(request, messages):
@permission('pyload.can_see_dl')
@check_server
def home(request):
- return render_to_response(join(settings.TEMPLATE,'home.html'), RequestContext(request))
+ return render_to_response(join(settings.TEMPLATE,'home.html'), RequestContext(request,{},[status_proc]))
@login_required
@permission('pyload.can_see_dl')
@check_server
def queue(request):
- return render_to_response(join(settings.TEMPLATE,'queue.html'), RequestContext(request))
+ return render_to_response(join(settings.TEMPLATE,'queue.html'), RequestContext(request,{},[status_proc]))
@login_required
@@ -94,7 +99,7 @@ def downloads(request):
data['files'].append(item)
- return render_to_response(join(settings.TEMPLATE,'downloads.html'), {'files': data}, RequestContext(request))
+ return render_to_response(join(settings.TEMPLATE,'downloads.html'), RequestContext(request,{'files': data},[status_proc]))
@login_required
@permission('pyload.user.can_download')
@@ -132,4 +137,4 @@ def download(request,path):
@permission('pyload.user.can_see_logs')
@check_server
def logs(request):
- return render_to_response(join(settings.TEMPLATE,'logs.html'), RequestContext(request)) \ No newline at end of file
+ return render_to_response(join(settings.TEMPLATE,'logs.html'), RequestContext(request,{},[status_proc])) \ No newline at end of file
diff --git a/module/web/templates/default/base.html b/module/web/templates/default/base.html
index 46e9caa11..307dd821a 100644
--- a/module/web/templates/default/base.html
+++ b/module/web/templates/default/base.html
@@ -108,8 +108,8 @@ $(document).ready(function(){
{% if perms.pyload.can_see_dl %}
<ul id="page-actions">
- <li><a href="" class="action backlink" accesskey="o" rel="nofollow">Speed: <b id="speed">0</b> kb/s</a></li>
- <li><a href="" class="action cog" accesskey="o" rel="nofollow">Aktiv: <b id="aktiv">0</b> / <b id="aktiv_from">0</b></a></li>
+ <li><a href="" class="action backlink" accesskey="o" rel="nofollow">Speed: <b id="speed">{{ status.speed }}</b> kb/s</a></li>
+ <li><a href="" class="action cog" accesskey="o" rel="nofollow">Aktiv: <b id="aktiv">{{ status.queue }}</b> / <b id="aktiv_from">{{ status.total }}</b></a></li>
<li><a href="" class="action revisions" accesskey="o" rel="nofollow">Reload page</a></li>
</ul><br />
{% endif %}
diff --git a/pyLoadCore.py b/pyLoadCore.py
index 7b7e2754d..946df9915 100755
--- a/pyLoadCore.py
+++ b/pyLoadCore.py
@@ -306,11 +306,22 @@ class Core(object):
#~ self.webserver = WebServer(self)
#~ if self.config['webinterface']['activated']:
#~ self.webserver.start()
+
+
+ def is_download_time(self):
+ start = self.core.config['downloadTime']['start'].split(":")
+ end = self.core.config['downloadTime']['end'].split(":")
+ return self.core.compare_time(start, end)
+
+ def is_reconnect_time(self):
+ start = self.core.config['reconnectTime']['start'].split(":")
+ end = self.core.config['reconnectTime']['end'].split(":")
+ return self.compare_time(start, end)
+
####################################
########## XMLRPC Methods ##########
####################################
-
class ServerMethods():
def __init__(self, core):
self.core = core
@@ -472,16 +483,6 @@ class ServerMethods():
# self.core.file_list.move(id, 1)
# self.core.file_list.save()
- def is_time_download(self):
- start = self.core.config['downloadTime']['start'].split(":")
- end = self.core.config['downloadTime']['end'].split(":")
- return self.core.compare_time(start, end)
-
- def is_time_reconnect(self):
- start = self.core.config['reconnectTime']['start'].split(":")
- end = self.core.config['reconnectTime']['end'].split(":")
- return self.compare_time(start, end)
-
if __name__ == "__main__":
pyload_core = Core()
try: