mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-20 20:01:31 -06:00
WebHost: list unrecognized games as Other in stats (#5236)
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user