diff --git a/games/game.html b/games/game.html index 5d93e0689..41b0a076e 100644 --- a/games/game.html +++ b/games/game.html @@ -54,6 +54,7 @@
server.games.game
server.games.game
server.games.game
server.games.game
def set_hosted(self):
- self._hosted_future.set_result(None)
+ self._hosted_future.set_result(None)
+ self.hosted_at = datetime_now()
@@ -2877,6 +2885,7 @@ Params
"host": self.host.login if self.host else "",
"num_players": len(connected_players),
"max_players": self.max_players,
+ "hosted_at": self.hosted_at.isoformat() if self.hosted_at else None,
"launched_at": self.launched_at,
"rating_type": self.rating_type,
"rating_min": self.displayed_rating_range.lo,
diff --git a/games/index.html b/games/index.html
index afa40ae85..b900f9feb 100644
--- a/games/index.html
+++ b/games/index.html
@@ -449,6 +449,7 @@ Class variables
self._game_stats_service = game_stats_service
self.game_service = game_service
self._player_options: dict[int, dict[str, Any]] = defaultdict(dict)
+ self.hosted_at = None
self.launched_at = None
self.finished = False
self._logger = logging.getLogger(
@@ -635,6 +636,7 @@ Class variables
def set_hosted(self):
self._hosted_future.set_result(None)
+ self.hosted_at = datetime_now()
async def add_result(
self,
@@ -1265,6 +1267,7 @@ Class variables
"host": self.host.login if self.host else "",
"num_players": len(connected_players),
"max_players": self.max_players,
+ "hosted_at": self.hosted_at.isoformat() if self.hosted_at else None,
"launched_at": self.launched_at,
"rating_type": self.rating_type,
"rating_min": self.displayed_rating_range.lo,
@@ -2213,7 +2216,8 @@ Params
Expand source code
def set_hosted(self):
- self._hosted_future.set_result(None)
+ self._hosted_future.set_result(None)
+ self.hosted_at = datetime_now()
@@ -2301,6 +2305,7 @@ Params
"host": self.host.login if self.host else "",
"num_players": len(connected_players),
"max_players": self.max_players,
+ "hosted_at": self.hosted_at.isoformat() if self.hosted_at else None,
"launched_at": self.launched_at,
"rating_type": self.rating_type,
"rating_min": self.displayed_rating_range.lo,