mirror of
https://github.com/doms9/iptv.git
synced 2026-01-21 03:59:03 +01:00
e
This commit is contained in:
parent
7b48b92660
commit
00000d979f
5 changed files with 10 additions and 0 deletions
|
|
@ -21,6 +21,8 @@ async def get_events(cached_keys: list[str]) -> list[dict[str, str]]:
|
||||||
events = []
|
events = []
|
||||||
|
|
||||||
if not (api_data := API_FILE.load(per_entry=False)):
|
if not (api_data := API_FILE.load(per_entry=False)):
|
||||||
|
log.info("Refreshing API cache")
|
||||||
|
|
||||||
api_data = {}
|
api_data = {}
|
||||||
|
|
||||||
if r := await network.request(
|
if r := await network.request(
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,8 @@ async def get_events(cached_keys: list[str]) -> list[dict[str, str]]:
|
||||||
now = Time.clean(Time.now())
|
now = Time.clean(Time.now())
|
||||||
|
|
||||||
if not (api_data := API_CACHE.load(per_entry=False)):
|
if not (api_data := API_CACHE.load(per_entry=False)):
|
||||||
|
log.info("Refreshing API cache")
|
||||||
|
|
||||||
api_data = {}
|
api_data = {}
|
||||||
|
|
||||||
if r := await network.request(BASE_URL, log=log):
|
if r := await network.request(BASE_URL, log=log):
|
||||||
|
|
|
||||||
|
|
@ -31,6 +31,8 @@ async def get_events(api_url: str, cached_keys: list[str]) -> list[dict[str, str
|
||||||
events = []
|
events = []
|
||||||
|
|
||||||
if not (api_data := API_FILE.load(per_entry=False)):
|
if not (api_data := API_FILE.load(per_entry=False)):
|
||||||
|
log.info("Refreshing API cache")
|
||||||
|
|
||||||
api_data = {}
|
api_data = {}
|
||||||
|
|
||||||
if r := await network.request(api_url, log=log):
|
if r := await network.request(api_url, log=log):
|
||||||
|
|
|
||||||
|
|
@ -35,6 +35,8 @@ async def get_events(cached_keys: list[str]) -> list[dict[str, str]]:
|
||||||
now = Time.clean(Time.now())
|
now = Time.clean(Time.now())
|
||||||
|
|
||||||
if not (api_data := API_FILE.load(per_entry=False, index=-1)):
|
if not (api_data := API_FILE.load(per_entry=False, index=-1)):
|
||||||
|
log.info("Refreshing API cache")
|
||||||
|
|
||||||
api_data = []
|
api_data = []
|
||||||
|
|
||||||
if r := await network.request(
|
if r := await network.request(
|
||||||
|
|
|
||||||
|
|
@ -37,6 +37,8 @@ async def get_events(url: str, cached_keys: list[str]) -> list[dict[str, str]]:
|
||||||
now = Time.clean(Time.now())
|
now = Time.clean(Time.now())
|
||||||
|
|
||||||
if not (api_data := API_FILE.load(per_entry=False, index=-1)):
|
if not (api_data := API_FILE.load(per_entry=False, index=-1)):
|
||||||
|
log.info("Refreshing API cache")
|
||||||
|
|
||||||
api_data = []
|
api_data = []
|
||||||
|
|
||||||
if r := await network.request(
|
if r := await network.request(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue