mirror of
https://github.com/doms9/iptv.git
synced 2026-04-21 19:46:59 +02:00
e
This commit is contained in:
parent
7a5724f165
commit
00000d9aa1
5 changed files with 13 additions and 11 deletions
|
|
@ -13,7 +13,7 @@ TAG = "EMBEDHD"
|
|||
|
||||
CACHE_FILE = Cache(TAG, exp=5_400)
|
||||
|
||||
API_CACHE = Cache(f"{TAG}-api", exp=28_800)
|
||||
API_FILE = Cache(f"{TAG}-api", exp=28_800)
|
||||
|
||||
BASE_URL = "https://embedhd.org"
|
||||
|
||||
|
|
@ -25,7 +25,7 @@ def fix_league(s: str) -> str:
|
|||
async def get_events(cached_keys: list[str]) -> list[dict[str, str]]:
|
||||
now = Time.clean(Time.now())
|
||||
|
||||
if not (api_data := API_CACHE.load(per_entry=False)):
|
||||
if not (api_data := API_FILE.load(per_entry=False)):
|
||||
log.info("Refreshing API cache")
|
||||
|
||||
api_data = {"timestamp": now.timestamp()}
|
||||
|
|
@ -35,7 +35,7 @@ async def get_events(cached_keys: list[str]) -> list[dict[str, str]]:
|
|||
|
||||
api_data["timestamp"] = now.timestamp()
|
||||
|
||||
API_CACHE.write(api_data)
|
||||
API_FILE.write(api_data)
|
||||
|
||||
events = []
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue