mirror of
https://github.com/doms9/iptv.git
synced 2026-01-21 03:59:03 +01:00
e
fix hanging if no available mirrors
This commit is contained in:
parent
3a1d2742f1
commit
00000d9233
8 changed files with 24 additions and 16 deletions
|
|
@ -25,7 +25,7 @@ def fix_league(s: str) -> str:
|
|||
async def refresh_api_cache(
|
||||
client: httpx.AsyncClient,
|
||||
url: str,
|
||||
ts: float,
|
||||
now_ts: float,
|
||||
) -> dict[str, dict[str, str]]:
|
||||
log.info("Refreshing API cache")
|
||||
|
||||
|
|
@ -37,9 +37,10 @@ async def refresh_api_cache(
|
|||
|
||||
return {}
|
||||
|
||||
data = r.json()
|
||||
if not (data := r.json()):
|
||||
return {}
|
||||
|
||||
data["timestamp"] = ts
|
||||
data["timestamp"] = now_ts
|
||||
|
||||
return data
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue