summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndré Glüpker <git@wgmd.de>2018-03-24 15:22:08 +0100
committerAndré Glüpker <git@wgmd.de>2018-03-24 15:22:08 +0100
commit0d451687c2b3470562d2ef9d855b7cd502d65541 (patch)
tree9fce196b7b743fa8847fa129eb8a2c902de8f428
parentcce93a437d44465df08c34b4fda4853e346fda37 (diff)
downloadsteam-0d451687c2b3470562d2ef9d855b7cd502d65541.tar.gz
steam-0d451687c2b3470562d2ef9d855b7cd502d65541.tar.bz2
steam-0d451687c2b3470562d2ef9d855b7cd502d65541.zip
Display minutes for connection duration
-rwxr-xr-xmain.py6
-rw-r--r--templates/server_html.jinja6
2 files changed, 5 insertions, 7 deletions
diff --git a/main.py b/main.py
index 9ae9b54..2a1f51b 100755
--- a/main.py
+++ b/main.py
@@ -175,10 +175,8 @@ def server():
for name, server in servers.items():
server['data'] = QueryServer.QueryServer(server['ip'], server['port'], server['gameid'])
return render_template('server_html.jinja',
- servers=servers
- # profiles=premadedata,
- # display_time=display_time,
- # connections=connections
+ servers=servers,
+ display_time = display_time
)
if __name__ == '__main__':
diff --git a/templates/server_html.jinja b/templates/server_html.jinja
index e22eb29..0306d13 100644
--- a/templates/server_html.jinja
+++ b/templates/server_html.jinja
@@ -32,15 +32,15 @@
{% if info['data']['players'] %}
<table class="playerlist">
<tr>
- <th width="60%">Name</th>
+ <th width="50%">Name</th>
<th width="20%">Score</th>
- <th width="20%">Time</th>
+ <th width="30%">Time</th>
</tr>
{% for player in info['data']['player_info'] | sort(attribute='score', reverse=True) %}
<tr>
<td class="name">{{ player['name'] }}</td>
<td>{{ player['score'] }}</td>
- <td>{{ player['duration'] }}s</td>
+ <td>{{ display_time(player['duration']) }}s</td>
</tr>
{% endfor %}
</table>