fix window for embedhd.py
fix window for streamcenter.py
use preset logos for streamfree.py
This commit is contained in:
doms9 2026-01-09 13:29:51 -05:00
parent e544d6fe32
commit 00000d9976
3 changed files with 7 additions and 11 deletions

View file

@ -37,6 +37,8 @@ async def get_events(cached_keys: list[str]) -> list[dict[str, str]]:
API_CACHE.write(api_data)
events = []
start_dt = now.delta(minutes=-30)
end_dt = now.delta(hours=3)
for info in api_data.get("days", []):
for event in info["items"]:
@ -45,7 +47,7 @@ async def get_events(cached_keys: list[str]) -> list[dict[str, str]]:
event_dt = Time.from_str(event["when_et"], timezone="ET")
if now.date() != event_dt.date():
if not start_dt <= event_dt <= end_dt:
continue
sport = fix_league(event_league)