From a3af953683fc60a36956d883df39087ce2c8dab3 Mon Sep 17 00:00:00 2001 From: Fabian Dill Date: Sat, 26 Jul 2025 14:12:45 +0200 Subject: [PATCH] WebHost: list unrecognized games as Other in stats (#5236) --- WebHostLib/stats.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/WebHostLib/stats.py b/WebHostLib/stats.py index 6fd73caf..2ce25c2c 100644 --- a/WebHostLib/stats.py +++ b/WebHostLib/stats.py @@ -25,8 +25,11 @@ def get_db_data(known_games: set[str]) -> tuple[Counter[str], defaultdict[date, for room in select(room for room in Room if room.creation_time >= cutoff): for slot in room.seed.slots: if slot.game in known_games: - total_games[slot.game] += 1 - games_played[room.creation_time.date()][slot.game] += 1 + current_game = slot.game + else: + current_game = "Other" + total_games[current_game] += 1 + games_played[room.creation_time.date()][current_game] += 1 return total_games, games_played