Mythus commited on
Commit
aaece51
·
verified ·
1 Parent(s): 8c91fbf

Update run.py

Browse files
Files changed (1) hide show
  1. run.py +3 -3
run.py CHANGED
@@ -81,11 +81,11 @@ def catalog():
81
 
82
  @app.route('/stream/<type>/<id>.json')
83
  def addon_stream(type, id):
84
- if type not in MANIFEST['types']:
85
  abort(404)
86
- streams = {'streams': []}
87
 
88
- channel = STREAMS.get(type, {}).get(id)
 
89
  if channel:
90
  logging.debug(f"Found TV channel: {id}")
91
  streams['streams'] = [{"title": channel["name"], "url": channel["url"]}]
 
81
 
82
  @app.route('/stream/<type>/<id>.json')
83
  def addon_stream(type, id):
84
+ if type != "channel": # Change this to "channel"
85
  abort(404)
 
86
 
87
+ streams = {'streams': []}
88
+ channel = STREAMS.get("tv", {}).get(id) # Change the type here to "tv"
89
  if channel:
90
  logging.debug(f"Found TV channel: {id}")
91
  streams['streams'] = [{"title": channel["name"], "url": channel["url"]}]