Mythus commited on
Commit
49a61d7
·
verified ·
1 Parent(s): 512126c

Update run.py

Browse files
Files changed (1) hide show
  1. run.py +10 -10
run.py CHANGED
@@ -120,18 +120,18 @@ def addon_stream(type, id):
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
 
 
120
 
121
  @app.route('/meta/<type>/<id>.json')
122
  def meta(type, id):
123
+ if type != "channel":
124
  abort(404)
125
 
126
+ for channel in STREAMS:
127
+ if channel["id"] == id:
128
+ return respond_with({
129
+ "meta": {
130
+ "id": channel["id"],
131
+ "name": channel["name"],
132
+ "type": "channel"
133
+ }
134
+ })
135
 
136
  abort(404)
137