diff --git a/server.py b/server.py index 8be7dda..c16f12b 100644 --- a/server.py +++ b/server.py @@ -17,11 +17,12 @@ import json import re from datetime import datetime -PGN_URL = os.environ.get("PGN_URL", "https://www.deutsche-schachjugend.de/2026/odjm-d/partien/gesamt-utf8.pgn") +CURRENT_ROUND = int(os.environ.get("CURRENT_ROUND", 2)) +PGN_URL = f"https://www.deutsche-schachjugend.de/2026/odjm-d/partien/{CURRENT_ROUND}.pgn" STANDINGS_URL = "https://www.deutsche-schachjugend.de/2026/odjm-d/tabelle/" PORT = int(os.environ.get("PORT", 8111)) CACHE_DIR = os.path.join(os.path.dirname(os.path.abspath(__file__)), "cache") -CACHE_FILE = os.path.join(CACHE_DIR, "gesamt-utf8.pgn") +CACHE_FILE = os.path.join(CACHE_DIR, f"runde-{CURRENT_ROUND}.pgn") STANDINGS_CACHE_FILE = os.path.join(CACHE_DIR, "standings.json") CACHE_TTL = int(os.environ.get("CACHE_TTL", 31)) # Sekunden