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,