diff options
author | mkaay <mkaay@mkaay.de> | 2010-01-13 21:12:24 +0100 |
---|---|---|
committer | mkaay <mkaay@mkaay.de> | 2010-01-13 21:12:24 +0100 |
commit | 36ed6c373b8dfde42f81e28d62c540aba5a3c04d (patch) | |
tree | b4f29e3539cf9dad9a9f9a3d98afda7e130d7fae /module/web/pyload | |
parent | Fixed MyVideo.de (yuck) (diff) | |
download | pyload-36ed6c373b8dfde42f81e28d62c540aba5a3c04d.tar.xz |
queue template + view
Diffstat (limited to 'module/web/pyload')
-rw-r--r-- | module/web/pyload/views.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/module/web/pyload/views.py b/module/web/pyload/views.py index a28b71e69..55887d711 100644 --- a/module/web/pyload/views.py +++ b/module/web/pyload/views.py @@ -73,7 +73,13 @@ def home(request): @permission('pyload.can_see_dl') @check_server def queue(request): - return render_to_response(join(settings.TEMPLATE, 'queue.html'), RequestContext(request, {}, [status_proc])) + queue = settings.PYLOAD.get_queue() + for pack in queue: + children = [] + for child in settings.PYLOAD.get_package_files(pack["id"]): + children.append(settings.PYLOAD.get_file_info()) + pack["children"] = children + return render_to_response(join(settings.TEMPLATE, 'queue.html'), RequestContext(request, {'content': queue}, [status_proc])) @login_required @@ -147,4 +153,4 @@ def logs(request, page=0): for i in range(page, page + 20): data.append({'line': i + 1, 'content':log[i]}) - return render_to_response(join(settings.TEMPLATE, 'logs.html'), RequestContext(request, {'log': data, 'next': str(page + 20), 'prev': 0 if page-20 < 0 else page-20}, [status_proc]))
\ No newline at end of file + return render_to_response(join(settings.TEMPLATE, 'logs.html'), RequestContext(request, {'log': data, 'next': str(page + 20), 'prev': 0 if page-20 < 0 else page-20}, [status_proc])) |