Spaces:
Paused
Paused
Update run.py
Browse files
run.py
CHANGED
|
@@ -120,18 +120,21 @@ def addon_stream(type, id):
|
|
| 120 |
|
| 121 |
@app.route('/meta/<type>/<id>.json')
|
| 122 |
def meta(type, id):
|
| 123 |
-
|
|
|
|
|
|
|
|
|
|
| 124 |
abort(404)
|
| 125 |
|
| 126 |
-
|
| 127 |
-
|
| 128 |
-
|
| 129 |
-
|
| 130 |
-
|
| 131 |
-
|
| 132 |
-
|
| 133 |
-
|
| 134 |
-
|
| 135 |
|
| 136 |
abort(404)
|
| 137 |
|
|
|
|
| 120 |
|
| 121 |
@app.route('/meta/<type>/<id>.json')
|
| 122 |
def meta(type, id):
|
| 123 |
+
# This route gets the metadata of a channel
|
| 124 |
+
# `type` should be "tv", and `id` should be the id of the channel (like "channel1")
|
| 125 |
+
|
| 126 |
+
if type != "tv":
|
| 127 |
abort(404)
|
| 128 |
|
| 129 |
+
channel = STREAMS.get(type, {}).get(id)
|
| 130 |
+
if channel:
|
| 131 |
+
return respond_with({
|
| 132 |
+
"meta": {
|
| 133 |
+
"id": id,
|
| 134 |
+
"name": channel["name"],
|
| 135 |
+
"type": "channel"
|
| 136 |
+
}
|
| 137 |
+
})
|
| 138 |
|
| 139 |
abort(404)
|
| 140 |
|