summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--module/web/pyload/views.py2
-rw-r--r--module/web/templates/default/base.html2
-rw-r--r--module/web/templates/default/home.html15
-rwxr-xr-xpyLoadCli.py7
-rwxr-xr-xpyLoadCore.py4
5 files changed, 24 insertions, 6 deletions
diff --git a/module/web/pyload/views.py b/module/web/pyload/views.py
index a51a9c4dc..1fa9d45b7 100644
--- a/module/web/pyload/views.py
+++ b/module/web/pyload/views.py
@@ -63,7 +63,7 @@ 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,{},[status_proc]))
+ return render_to_response(join(settings.TEMPLATE,'home.html'), RequestContext(request,{'content': settings.PYLOAD.status_downloads()},[status_proc]))
@login_required
diff --git a/module/web/templates/default/base.html b/module/web/templates/default/base.html
index c43d5223c..657bdcf09 100644
--- a/module/web/templates/default/base.html
+++ b/module/web/templates/default/base.html
@@ -274,7 +274,7 @@ $(document).ready(function(){
{% if perms.pyload.can_see_dl %}
<ul id="page-actions">
<li><a class="action backlink">Speed: <b id="speed">{{ status.speed }}</b> kb/s</a></li>
- <li><a class="action cog">Active: <b id="aktiv">{{ status.queue }}</b> / <b id="aktiv_from">{{ status.total }}</b></a></li>
+ <li><a class="action cog">Active: <b id="aktiv">{{ status.activ }}</b> / <b id="aktiv_from">{{ status.queue }}</b></a></li>
<li><a href="" class="action revisions" accesskey="o" rel="nofollow">Reload page</a></li>
</ul><br />
{% endif %}
diff --git a/module/web/templates/default/home.html b/module/web/templates/default/home.html
index 8124902db..43cf16ae0 100644
--- a/module/web/templates/default/home.html
+++ b/module/web/templates/default/home.html
@@ -16,6 +16,21 @@ Active Downloads
<th>Progress</th>
</tr>
<tbody id="LinksAktiv">
+
+ {% for link in content %}
+ <tr id="link_{{ link.id }}">
+ <td id="link_{{ link.id }}_name">{{ link.name }}</td>
+ <td id="link_{{ link.id }}_status">{{ link.status }}</td>
+ <td id="link_{{ link.id }}_eta">{{ content.eta }} @ {{content.speed }}</td>
+ <td id="link_{{ link.id }}_kbleft">{{ link.kbleft }}</td>
+ <td id="link_{{ link.id }}_percent"><font id="aktiv_percent">{{ link.percent }}</font>% / {{ link.size }}</td>
+ </tr>
+ <tr>
+ <td colspan="5">
+ <div id="link_{{ link.id }}_pgb" class="progress_bar" style="overflow: hidden; width: {{ link.percent }}%; display: block;">&nbsp;</div>
+ </td>
+ </tr>
+ {% endfor %}
<tbody>
</table>
{% endblock %} \ No newline at end of file
diff --git a/pyLoadCli.py b/pyLoadCli.py
index 8a0bd2b3f..061c366af 100755
--- a/pyLoadCli.py
+++ b/pyLoadCli.py
@@ -73,7 +73,10 @@ class pyLoadCli:
os.system("clear")
sys.exit() # ctrl + c
elif ord(inp) == 13:
- self.handle_input()
+ try:
+ self.handle_input()
+ except Exception, e:
+ self.println(2, red(str(e)))
self.input = "" #enter
self.print_input()
elif ord(inp) == 127:
@@ -189,7 +192,7 @@ class pyLoadCli:
line += 1
self.println(line, "Parse the links you want to add.")
line += 1
- self.println(line, "Type END when done.")
+ self.println(line, "Type "+mag("END")+" when done.")
line += 1
self.println(line, "Links added: " + mag(str(self.links_added)))
line += 1
diff --git a/pyLoadCore.py b/pyLoadCore.py
index 50c5d2c55..2a9cbbc59 100755
--- a/pyLoadCore.py
+++ b/pyLoadCore.py
@@ -159,8 +159,8 @@ class Core(object):
while True:
sleep(2)
if self.do_kill:
- self.logger.info("pyLoad quits")
- self.webserver.quit()
+ self.logger.info("pyLoad quits")
+ self.webserver.quit()
self.webserver.join()
exit()