summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndré Glüpker <git@wgmd.de>2017-12-20 19:47:04 +0100
committerAndré Glüpker <git@wgmd.de>2017-12-20 19:47:04 +0100
commitc9bad924c7c3bc91cdf220fbc1507d1812d504f3 (patch)
tree171499b4d0eeccf2b41d3983d18089088708894d
parentc28501869736728ad57f64cb8ef723e613af04ef (diff)
downloadsteam-c9bad924c7c3bc91cdf220fbc1507d1812d504f3.tar.gz
steam-c9bad924c7c3bc91cdf220fbc1507d1812d504f3.tar.bz2
steam-c9bad924c7c3bc91cdf220fbc1507d1812d504f3.zip
Improve on missing gameextrainfo in steam api.
Show 'ingame', if gameid set. Show N/A, if gameextrainfo not set.
-rw-r--r--templates/lobby_html.jinja7
1 files changed, 4 insertions, 3 deletions
diff --git a/templates/lobby_html.jinja b/templates/lobby_html.jinja
index efb307e..54d5037 100644
--- a/templates/lobby_html.jinja
+++ b/templates/lobby_html.jinja
@@ -1,4 +1,5 @@
-<html><head>
+<html>
+ <head>
<title>CS:GO Lobbylinkfinder</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="static/style.css" />
@@ -26,7 +27,7 @@
{# avatar: 32x32, avatarmedium: 64x64, avatarfull: 184x184 #}
{% for steamid,profile in steamids.items() %}
- {% if profile['gameextrainfo'] %}{% set state = "Ingame" %}{% else %}{% set state = states[profile['personastate']].lower().replace(' ', '') %}{% endif %}
+ {% if profile['gameid'] %}{% set state = "Ingame" %}{% else %}{% set state = states[profile['personastate']].lower().replace(' ', '') %}{% endif %}
<div class="player {{ state }}">
<div class="interna">
@@ -39,7 +40,7 @@
<div class="interna stats">
{# Ingame (Steam), Ingame (Nonsteam), Offline/Other #}
{% if profile['gameid'] %}
- <span class="ingame"><a href="http://store.steampowered.com/app/{{ profile['gameid'] }}" class="ingame">{{ profile['gameextrainfo'] }}
+ <span class="ingame"><a href="http://store.steampowered.com/app/{{ profile['gameid'] }}" class="ingame">{{ profile['gameextrainfo'] or 'N/A' }}
{% if profile['gameserverip'] not in serverinfo %}
{# No serverinfo -> Display game logo #}
<img src="http://cdn.akamai.steamstatic.com/steam/apps/{{ profile['gameid'] }}/header.jpg" class="gameimage" />