Skip to content

Commit 9bff3fc

Browse files
committed
leaderboard fix
1 parent 6cb59c6 commit 9bff3fc

File tree

2 files changed

+8
-12
lines changed

2 files changed

+8
-12
lines changed

ValTracker/ValTracker.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1184,7 +1184,7 @@ def get_leaderboard(self) -> None:
11841184
start_time = time.time()
11851185
try:
11861186
# Get Values
1187-
season = self.act.currentText().lower()
1187+
season = self.act.currentText()
11881188
region = self.leaderboard_region.currentText()
11891189
player_limit = int(self.player_count.value())
11901190
player_cards = {}
@@ -1198,7 +1198,7 @@ def get_leaderboard(self) -> None:
11981198
leaderboard = valo_api.get_leaderboard(
11991199
version="v2",
12001200
region=region,
1201-
season_id=season,
1201+
season=seasons[season],
12021202
)
12031203

12041204
self.update_loading_bar(50) # Update loading bar to 50%

ValTracker/functions.py

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@
1717
)
1818

1919
seasons = {
20-
# "V25A4": "e10a4",
20+
# "V25A6": "e10a6",
21+
# "V25A5": "e10a5",
22+
"V25A4": "e10a4",
2123
"V25A3": "e10a3",
2224
"V25A2": "e10a2",
2325
"V25A1": "e10a1",
@@ -57,9 +59,7 @@ def get_ranks() -> dict:
5759
Cached to avoid repeated requests.
5860
"""
5961
try:
60-
resp = requests.get(
61-
"https://valorant-api.com/v1/competitivetiers", timeout=10
62-
)
62+
resp = requests.get("https://valorant-api.com/v1/competitivetiers", timeout=10)
6363
resp.raise_for_status()
6464
data = resp.json()
6565
# Defensive: prüfe Struktur
@@ -148,9 +148,7 @@ def download_agent_images() -> None:
148148
"""
149149
try:
150150
# Holen der Agenten-Daten von der API
151-
response = requests.get(
152-
"https://valorant-api.com/v1/agents", timeout=10
153-
)
151+
response = requests.get("https://valorant-api.com/v1/agents", timeout=10)
154152
response.raise_for_status()
155153
agents_data = response.json()
156154
agents = agents_data.get("data", [])
@@ -160,9 +158,7 @@ def download_agent_images() -> None:
160158

161159
with requests.Session() as session:
162160
for agent in agents:
163-
agent_name = humanize_agent_name(
164-
agent.get("displayName", "unknown")
165-
)
161+
agent_name = humanize_agent_name(agent.get("displayName", "unknown"))
166162
agent_image_url = agent.get("displayIcon")
167163
if not agent_image_url:
168164
logging.warning(f"No image found for agent {agent_name}")

0 commit comments

Comments
 (0)