mirror of
https://github.com/doms9/iptv.git
synced 2026-03-07 11:18:25 +01:00
e
add olympic games to livetvsx.py
This commit is contained in:
parent
fde7270ab9
commit
00000d9735
2 changed files with 9 additions and 4 deletions
|
|
@ -22,6 +22,7 @@ VALID_SPORTS = {
|
||||||
"Football",
|
"Football",
|
||||||
"Basketball",
|
"Basketball",
|
||||||
"Ice Hockey",
|
"Ice Hockey",
|
||||||
|
"Olympic Games",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -140,9 +141,6 @@ async def refresh_xml_cache(now_ts: float) -> dict[str, dict[str, str | float]]:
|
||||||
|
|
||||||
sport, league = sprt[0], "".join(sprt[1:]).strip()
|
sport, league = sprt[0], "".join(sprt[1:]).strip()
|
||||||
|
|
||||||
if sport not in VALID_SPORTS:
|
|
||||||
continue
|
|
||||||
|
|
||||||
event_dt = Time.from_str(date)
|
event_dt = Time.from_str(date)
|
||||||
|
|
||||||
key = f"[{sport} - {league}] {title} ({TAG})"
|
key = f"[{sport} - {league}] {title} ({TAG})"
|
||||||
|
|
@ -176,6 +174,13 @@ async def get_events(cached_keys: list[str]) -> list[dict[str, str]]:
|
||||||
if k in cached_keys:
|
if k in cached_keys:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
if not (
|
||||||
|
v["sport"] in VALID_SPORTS
|
||||||
|
or v["league"] in VALID_SPORTS
|
||||||
|
or v["event"].lower() == "olympic games"
|
||||||
|
):
|
||||||
|
continue
|
||||||
|
|
||||||
if not start_ts <= v["event_ts"] <= end_ts:
|
if not start_ts <= v["event_ts"] <= end_ts:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ TAG = "STRMBTW"
|
||||||
|
|
||||||
CACHE_FILE = Cache(TAG, exp=3_600)
|
CACHE_FILE = Cache(TAG, exp=3_600)
|
||||||
|
|
||||||
API_FILE = Cache(f"{TAG}-api", exp=28_800)
|
API_FILE = Cache(f"{TAG}-api", exp=19_800)
|
||||||
|
|
||||||
BASE_URL = "https://hiteasport.info"
|
BASE_URL = "https://hiteasport.info"
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue