This commit is contained in:
NotSoToothless
2026-05-27 04:29:57 -07:00
committed by GitHub
parent 8760c63759
commit 0c99a911e0
4 changed files with 174 additions and 7 deletions
+3 -5
View File
@@ -2054,11 +2054,9 @@ async def process_match_summaries(new_games: List[Dict[str, Any]]) -> None:
# Load replay JSON
replay_path = replay_data_path(session_id)
try:
async with aiofiles.open(replay_path, "r", encoding="utf-8") as f:
replay_data = json.loads(await f.read())
except FileNotFoundError:
continue
except json.JSONDecodeError:
raw = await asyncio.to_thread(replay_path.read_bytes)
replay_data = json.loads(gzip.decompress(raw))
except (FileNotFoundError, OSError, json.JSONDecodeError):
continue
# Translate vehicle names & sanitize