Runde in PGN-URL (/pgn/{round}) und im Standings-Response

This commit is contained in:
2026-05-24 15:44:03 +02:00
parent 08ec14bd63
commit 12a2b5c7db
2 changed files with 10 additions and 2 deletions

View File

@@ -132,6 +132,7 @@ def fetch_standings():
"losses": clean[7],
"points": clean[8],
"round_info": round_info,
"round": current_round,
}
return None
except Exception as e:
@@ -162,7 +163,8 @@ class PGNHandler(http.server.BaseHTTPRequestHandler):
def do_GET(self):
parsed_path = urllib.parse.urlparse(self.path)
if parsed_path.path == "/pgn":
parts = parsed_path.path.strip("/").split("/")
if len(parts) == 2 and parts[0] == "pgn" and parts[1].isdigit():
params = urllib.parse.parse_qs(parsed_path.query)
since = float(params.get("since", [0])[0])
content, mtime = get_pgn_content_longpoll(since)