use window for embedhd
This commit is contained in:
doms9 2025-12-29 02:03:05 -05:00
parent 00000d9e80
commit 00000d9a11

View file

@ -38,10 +38,13 @@ async def get_events(cached_keys: list[str]) -> list[dict[str, str]]:
events = [] events = []
start_dt = now.delta(minutes=-30)
end_dt = now.delta(minutes=30)
for info in api_data.get("days", []): for info in api_data.get("days", []):
event_dt = Time.from_str(info["day_et"], timezone="ET") event_dt = Time.from_str(info["day_et"], timezone="ET")
if now.date() != event_dt.date(): if not start_dt <= event_dt <= end_dt:
continue continue
for event in info["items"]: for event in info["items"]: