Spaces:
Paused
Paused
Update run.py
Browse files
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
|
| 85 |
abort(404)
|
| 86 |
-
streams = {'streams': []}
|
| 87 |
|
| 88 |
-
|
|
|
|
| 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"]}]
|