e
This commit is contained in:
parent
00000d91bb
commit
00000d9a4d
6 changed files with 13 additions and 24 deletions
|
|
@ -35,19 +35,21 @@ async def get_events(client: httpx.AsyncClient) -> dict[str, dict[str, str | flo
|
|||
|
||||
events = {}
|
||||
|
||||
for _, streams in api_data.get("streams", {}).items():
|
||||
for streams in api_data.get("streams", {}).values():
|
||||
if not streams:
|
||||
continue
|
||||
|
||||
for stream in streams:
|
||||
sport, name = stream["league"], stream["name"]
|
||||
|
||||
stream_key = stream["stream_key"]
|
||||
|
||||
key = f"[{sport}] {name} ({TAG})"
|
||||
|
||||
tvg_id, logo = leagues.get_tvg_info(sport, name)
|
||||
|
||||
events[key] = {
|
||||
"url": urljoin(BASE_URL, f"live/{stream['stream_key']}720p/index.m3u8"),
|
||||
"url": urljoin(BASE_URL, f"live/{stream_key}720p/index.m3u8"),
|
||||
"logo": logo,
|
||||
"base": BASE_URL,
|
||||
"timestamp": Time.now().timestamp(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue