diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2009-08-18 21:32:51 +0200 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2009-08-18 21:32:51 +0200 |
commit | 172f6a10b9d3f2fc1878147132af73e96d9bd67e (patch) | |
tree | 5cbeb315b5d624465d3b0521523a051ace0a36bd /module/web/WebServer.py | |
parent | Updated Config System (diff) | |
download | pyload-172f6a10b9d3f2fc1878147132af73e96d9bd67e.tar.xz |
some webinterface functions
Diffstat (limited to 'module/web/WebServer.py')
-rw-r--r-- | module/web/WebServer.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/module/web/WebServer.py b/module/web/WebServer.py index 189a38704..fe103e83d 100644 --- a/module/web/WebServer.py +++ b/module/web/WebServer.py @@ -65,7 +65,7 @@ def do_login(): response.COOKIES['user'] = username response.COOKIES['id'] = id - return template('default', page='home', links=core.get_downloads(), user=username) + return template('default', page='loggedin', links=core.get_downloads(), user=username) else: return template('default', page='login') @@ -94,7 +94,15 @@ def home(): username = request.COOKIES.get('user') - return template('default', page='home', links=core.get_downloads(), user=username) + dls = core.get_downloads() + + for dl in dls: + dl['eta'] = core.format_time(dl['eta']) + dl['wait_until'] = core.format_time(dl['wait_until'] - time.time()) + print dl['eta'] + + + return template('default', page='home', links=dls, user=username) @route('/queue') def queue(): |