обновил статусы матчей, чтобы правильнее ожидалось, когда матч сегодня
This commit is contained in:
10
visual.py
10
visual.py
@@ -439,7 +439,7 @@ cached_referee = st.session_state.get("referee")
|
||||
league_tag = None
|
||||
if isinstance(cached_game_online, dict):
|
||||
league_tag = (cached_game_online.get("league") or {}).get("tag")
|
||||
comp_name = (cached_game_online.get("comp") or {}).get("name").replace(" ", "_")
|
||||
comp_name = (cached_game_online.get("comp") or {}).get("name").replace(" ", "_").replace("|", "")
|
||||
if league_tag:
|
||||
load_data_from_json(f"standings_{league_tag}_{comp_name}")
|
||||
cached_standings = (
|
||||
@@ -1866,7 +1866,7 @@ try:
|
||||
except (FileNotFoundError, json.JSONDecodeError):
|
||||
play_type_id = []
|
||||
|
||||
teams_section = cached_game_online.get("teams") or {}
|
||||
teams_section = (cached_game_online or {}).get("teams") or {}
|
||||
# Если teams_section — список (например, [{"starts": [...]}, {...}])
|
||||
if isinstance(teams_section, list):
|
||||
if len(teams_section) >= 2:
|
||||
@@ -1925,7 +1925,7 @@ def get_event_time(row):
|
||||
return None
|
||||
|
||||
|
||||
teams_section = cached_game_online.get("teams") or {}
|
||||
teams_section = (cached_game_online or {}).get("teams") or {}
|
||||
|
||||
# Если teams_section — список (например, [{"starts": [...]}, {...}])
|
||||
if isinstance(teams_section, list):
|
||||
@@ -1959,9 +1959,9 @@ list_fullname = [None] + [
|
||||
if x.get("startRole") == "Player"
|
||||
]
|
||||
|
||||
|
||||
plays = plays if 'plays' in locals() else []
|
||||
with tab_pbp:
|
||||
# plays = ((cached_game_online or {}).get("result") or {}).get("plays") or []
|
||||
plays = ((cached_game_online or {}).get("result") or {}).get("plays") or []
|
||||
if plays:
|
||||
temp_data_pbp = pd.DataFrame(plays)
|
||||
col1_pbp, col2_pbp = tab_pbp.columns((3, 4))
|
||||
|
||||
Reference in New Issue
Block a user