From 1151027466a56dbc082237954508b916891673f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=AE=D1=80=D0=B8=D0=B9=20=D0=A7=D0=B5=D1=80=D0=BD=D0=B5?= =?UTF-8?q?=D0=BD=D0=BA=D0=BE?= Date: Sat, 22 Nov 2025 11:56:43 +0300 Subject: [PATCH] =?UTF-8?q?=D0=BF=D0=BE=D0=BF=D1=80=D0=B0=D0=B2=D0=B8?= =?UTF-8?q?=D0=BB=20=D0=BA=D0=B0=D1=80=D1=82=D0=B8=D0=BD=D0=BA=D0=B8=20?= =?UTF-8?q?=D0=B4=D0=BB=D1=8F=20W=20=D0=B8=20L?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- get_data.py | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/get_data.py b/get_data.py index a934b5b..313c306 100644 --- a/get_data.py +++ b/get_data.py @@ -3681,7 +3681,15 @@ async def last_5_games(): elif team_id == id2: is_win = score2 > score1 - wl_list.append("W" if is_win else "L" if is_win is not None else "") + wl_list.append( + r"D:\Графика\БАСКЕТБОЛ\VTB League\ASSETS\LAST 5 GAMES\W.png" + if is_win + else ( + r"D:\Графика\БАСКЕТБОЛ\VTB League\ASSETS\LAST 5 GAMES\L.png" + if is_win is not None + else EMPTY_PHOTO_PATH + ) + ) return wl_list[::-1] @@ -3718,10 +3726,10 @@ async def last_5_games(): # определяем соперника и место if team_id == t1.get("teamId"): opp_name = t2.get("name", "") - place = "home" # команда дома + place = "home" # команда дома else: opp_name = t1.get("name", "") - place = "away" # команда в гостях + place = "away" # команда в гостях if best is None or dt < best["dt"]: best = {"dt": dt, "opp": opp_name, "place": place} @@ -3734,8 +3742,8 @@ async def last_5_games(): return { "opponent": best["opp"], "date": best["dt"].strftime("%Y-%m-%d %H:%M"), - "place": best["place"], # "home" / "away" - "place_ru": place_ru, # "дома" / "в гостях" + "place": best["place"], # "home" / "away" + "place_ru": place_ru, # "дома" / "в гостях" } # последние 5 игр и результаты @@ -3744,7 +3752,6 @@ async def last_5_games(): team1_wl = calc_results_list(team1_games, team1_id) team2_wl = calc_results_list(team2_games, team2_id) - # следующий матч next1 = find_next_game(team1_id) @@ -3757,8 +3764,8 @@ async def last_5_games(): "team_results": team1_wl, "nextOpponent": next1["opponent"], "nextGameDate": next1["date"], - "nextGamePlace": next1["place_ru"], # "дома" / "в гостях" - "nextGameHomeAway": next1["place"], # "home" / "away" (если нужно в логике) + "nextGamePlace": next1["place_ru"], # "дома" / "в гостях" + "nextGameHomeAway": next1["place"], # "home" / "away" (если нужно в логике) }, { "teamName": team2_name,