LoremPizza commited on
Commit
85bfeab
·
verified ·
1 Parent(s): 51ad99b

Update run.py

Browse files
Files changed (1) hide show
  1. run.py +6 -6
run.py CHANGED
@@ -75,7 +75,7 @@ def addon_manifest():
75
  def root():
76
  return "Hello, this is a Stremio Addon providing HTTPS Stream for Italian Movies/Series, to install it add /manifest.json to the url and then add it into the Stremio search bar"
77
 
78
- def addon_catalog(type: str, id: str, genre: str = None):
79
  print(f"Received genre parameter: {genre}")
80
  if type != "tv":
81
  raise HTTPException(status_code=404)
@@ -88,7 +88,7 @@ def addon_catalog(type: str, id: str, genre: str = None):
88
  if channel["id"] in tivu:
89
  print("WOW")
90
  print(channel['id'])
91
- description = tivu_get(channel["id"])
92
  if description == None:
93
  description = f'Watch {channel["title"]}'
94
  else:
@@ -104,13 +104,13 @@ def addon_catalog(type: str, id: str, genre: str = None):
104
 
105
  return catalogs
106
  @app.get('/catalog/{type}/{id}.json')
107
- def first_catalog(type: str, id: str, genre: str = None):
108
- catalogs = addon_catalog(type, id,genre)
109
  return respond_with(catalogs)
110
 
111
  @app.get('/catalog/{type}/{id}/genre={genre}.json')
112
- def first_catalog(type: str, id: str, genre: str = None):
113
- catalogs = addon_catalog(type, id,genre)
114
  return respond_with(catalogs)
115
 
116
  @app.get('/meta/tv/{id}.json')
 
75
  def root():
76
  return "Hello, this is a Stremio Addon providing HTTPS Stream for Italian Movies/Series, to install it add /manifest.json to the url and then add it into the Stremio search bar"
77
 
78
+ async def addon_catalog(type: str, id: str, genre: str = None):
79
  print(f"Received genre parameter: {genre}")
80
  if type != "tv":
81
  raise HTTPException(status_code=404)
 
88
  if channel["id"] in tivu:
89
  print("WOW")
90
  print(channel['id'])
91
+ description = await tivu_get(channel["id"])
92
  if description == None:
93
  description = f'Watch {channel["title"]}'
94
  else:
 
104
 
105
  return catalogs
106
  @app.get('/catalog/{type}/{id}.json')
107
+ async def first_catalog(type: str, id: str, genre: str = None):
108
+ catalogs = await addon_catalog(type, id,genre)
109
  return respond_with(catalogs)
110
 
111
  @app.get('/catalog/{type}/{id}/genre={genre}.json')
112
+ async def first_catalog(type: str, id: str, genre: str = None):
113
+ catalogs = await addon_catalog(type, id,genre)
114
  return respond_with(catalogs)
115
 
116
  @app.get('/meta/tv/{id}.json')