LoremPizza commited on
Commit
5fc20cb
·
verified ·
1 Parent(s): af0655f

Update run.py

Browse files
Files changed (1) hide show
  1. run.py +6 -11
run.py CHANGED
@@ -11,7 +11,7 @@ import logging
11
  from okru import okru_get_url
12
  from animeworld import animeworld
13
  from dictionaries import okru,STREAM,extra_sources,webru_vary,webru_dlhd
14
- from epg import epg_guide, convert_bho_1,convert_bho_2
15
  from webru import webru
16
  import httpx
17
  # Configure logging
@@ -114,14 +114,11 @@ async def addon_meta(id: str):
114
 
115
  if not channel:
116
  raise HTTPException(status_code=404, detail="Channel not found")
117
- async with httpx.AsyncClient() as client:
118
- if channel["id"] in convert_bho_1 or convert_bho_2:
119
- print(channel['id'])
120
- description,title = await epg_guide(channel["id"],client)
121
- if description == None:
122
- description = f'Watch {channel["title"]}'
123
- else:
124
- description = f'Watch {channel["title"]}'
125
  meta = {
126
  'meta': {
127
  'id': channel['id'],
@@ -145,8 +142,6 @@ async def addon_meta(id: str):
145
  async def addon_stream(type, id):
146
  if type not in MANIFEST['types']:
147
  raise HTTPException(status_code=404)
148
- if "https" or "http" in id:
149
- raise HTTPException(status_code=404)
150
  streams = {'streams': []}
151
  async with httpx.AsyncClient() as client:
152
  if type == "tv":
 
11
  from okru import okru_get_url
12
  from animeworld import animeworld
13
  from dictionaries import okru,STREAM,extra_sources,webru_vary,webru_dlhd
14
+ from epg import tivu, tivu_get,epg_guide,convert_bho_1,convert_bho_2
15
  from webru import webru
16
  import httpx
17
  # Configure logging
 
114
 
115
  if not channel:
116
  raise HTTPException(status_code=404, detail="Channel not found")
117
+ if channel["id"] in convert_bho_1 or channel["id"] in convert_bho_2:
118
+ description,title = await epg_guide(channel["id"])
119
+ else:
120
+ description = f'Watch {channel["title"]}'
121
+ title = ""
 
 
 
122
  meta = {
123
  'meta': {
124
  'id': channel['id'],
 
142
  async def addon_stream(type, id):
143
  if type not in MANIFEST['types']:
144
  raise HTTPException(status_code=404)
 
 
145
  streams = {'streams': []}
146
  async with httpx.AsyncClient() as client:
147
  if type == "tv":