summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschneefux <schneefux+commit@schneefux.xyz>2017-01-15 21:34:52 +0100
committerschneefux <schneefux+commit@schneefux.xyz>2017-01-15 21:34:52 +0100
commitc64577d1e4a01de22fe0293443934933d01f52ab (patch)
treeb40fb604d57ba29e8f6eaec78f367d2e9861bd5b
parentc02ac004d6c215c6a31843aaea04720198583fc9 (diff)
downloadpython-gamelocker-c64577d1e4a01de22fe0293443934933d01f52ab.tar.gz
python-gamelocker-c64577d1e4a01de22fe0293443934933d01f52ab.zip
ads: off by default
-rw-r--r--examples/dashboard/app.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/examples/dashboard/app.py b/examples/dashboard/app.py
index 754004f..c4e5e8e 100644
--- a/examples/dashboard/app.py
+++ b/examples/dashboard/app.py
@@ -17,7 +17,7 @@ cache = SimpleCache()
@app.route("/")
def index():
if "ads" not in session:
- session["ads"] = True
+ session["ads"] = False
return render_template("index.html", ads=ads.ads, useads=session["ads"])
@app.route("/ads-toggle")
@@ -55,12 +55,13 @@ def data():
players[participant.player.name] = 0
players[participant.player.name] += 1
- if participant.actor not in picks[match.gameMode]:
- picks[match.gameMode][participant.actor] = 0
- picks[match.gameMode][participant.actor] += 1
+ if participant.actor.pretty() not in picks[match.gameMode]:
+ picks[match.gameMode][participant.actor.pretty()] = 0
+ picks[match.gameMode][participant.actor.pretty()] += 1
- if participant.actor not in heroes:
- heroes[participant.actor] = 0
+ if participant.actor.pretty() not in heroes:
+ heroes[participant.actor.pretty()] = 0
+ heroes[participant.actor.pretty()] += 1
data["gameModes"] = [{"name": k, "y": v} for k, v in gameModes.items()]
data["durations"] = [{"name": k, "data": list(zip([list(durations.keys()).index(k)]*len(v), v))} for k, v in durations.items()]