mirror of
https://github.com/doms9/iptv.git
synced 2026-01-21 03:59:03 +01:00
e
use window for embedhd
This commit is contained in:
parent
00000d9e80
commit
00000d9a11
1 changed files with 4 additions and 1 deletions
|
|
@ -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"]:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue