Spaces:
Paused
Paused
Update run.py
Browse files
run.py
CHANGED
|
@@ -120,21 +120,22 @@ def addon_stream(type, id):
|
|
| 120 |
|
| 121 |
@app.route('/meta/<type>/<id>.json')
|
| 122 |
def meta(type, id):
|
| 123 |
-
if type != "
|
| 124 |
abort(404)
|
| 125 |
|
| 126 |
-
|
| 127 |
-
|
| 128 |
-
|
| 129 |
-
|
| 130 |
-
|
| 131 |
-
|
| 132 |
-
|
| 133 |
-
|
| 134 |
-
|
| 135 |
|
| 136 |
abort(404)
|
| 137 |
|
|
|
|
| 138 |
return respond_with({"meta": meta})
|
| 139 |
if __name__ == '__main__':
|
| 140 |
app.run(host=HOST, port=PORT)
|
|
|
|
| 120 |
|
| 121 |
@app.route('/meta/<type>/<id>.json')
|
| 122 |
def meta(type, id):
|
| 123 |
+
if type != "tv":
|
| 124 |
abort(404)
|
| 125 |
|
| 126 |
+
channel = STREAMS.get(type, {}).get(id)
|
| 127 |
+
if channel:
|
| 128 |
+
return respond_with({
|
| 129 |
+
"meta": {
|
| 130 |
+
"id": id,
|
| 131 |
+
"name": channel["name"],
|
| 132 |
+
"type": "channel"
|
| 133 |
+
}
|
| 134 |
+
})
|
| 135 |
|
| 136 |
abort(404)
|
| 137 |
|
| 138 |
+
|
| 139 |
return respond_with({"meta": meta})
|
| 140 |
if __name__ == '__main__':
|
| 141 |
app.run(host=HOST, port=PORT)
|