Spaces:
Paused
Paused
Update run.py
Browse files
run.py
CHANGED
|
@@ -40,7 +40,7 @@ MANIFEST = {
|
|
| 40 |
}
|
| 41 |
|
| 42 |
|
| 43 |
-
|
| 44 |
{"id": "channel1", "name": "Channel 1", "url": "https://d3749synfikwkv.cloudfront.net/v1/master/3722c60a815c199d9c0ef36c5b73da68a62b09d1/cc-74ylxpgd78bpb/Live.m3u8"},
|
| 45 |
{"id": "channel2", "name": "Channel 2", "url": "http://mediapolis.rai.it/relinker/relinkerServlet.htm?cont=2606803&output=7&forceUserAgent=raiplayappletv"},
|
| 46 |
# Add more channels as required
|
|
@@ -66,7 +66,7 @@ def root():
|
|
| 66 |
@app.route('/catalog/tv/tv_channels.json')
|
| 67 |
def catalog():
|
| 68 |
items = []
|
| 69 |
-
for channel in
|
| 70 |
items.append({
|
| 71 |
"id": channel["id"],
|
| 72 |
"name": channel["name"],
|
|
@@ -83,9 +83,9 @@ def addon_stream(type, id):
|
|
| 83 |
abort(404)
|
| 84 |
streams = {'streams': []}
|
| 85 |
|
| 86 |
-
if type in
|
| 87 |
logging.debug(f"Found TV channel: {id}")
|
| 88 |
-
streams['streams'] =
|
| 89 |
else:
|
| 90 |
logging.debug(f"Handling movie or series: {id}")
|
| 91 |
if MYSTERIUS == "1":
|
|
@@ -120,7 +120,7 @@ def meta(type, id):
|
|
| 120 |
if type != "channel":
|
| 121 |
abort(404)
|
| 122 |
|
| 123 |
-
for channel in
|
| 124 |
if channel["id"] == id:
|
| 125 |
return respond_with({
|
| 126 |
"meta": {
|
|
|
|
| 40 |
}
|
| 41 |
|
| 42 |
|
| 43 |
+
STREAMS = [
|
| 44 |
{"id": "channel1", "name": "Channel 1", "url": "https://d3749synfikwkv.cloudfront.net/v1/master/3722c60a815c199d9c0ef36c5b73da68a62b09d1/cc-74ylxpgd78bpb/Live.m3u8"},
|
| 45 |
{"id": "channel2", "name": "Channel 2", "url": "http://mediapolis.rai.it/relinker/relinkerServlet.htm?cont=2606803&output=7&forceUserAgent=raiplayappletv"},
|
| 46 |
# Add more channels as required
|
|
|
|
| 66 |
@app.route('/catalog/tv/tv_channels.json')
|
| 67 |
def catalog():
|
| 68 |
items = []
|
| 69 |
+
for channel in STREAMS:
|
| 70 |
items.append({
|
| 71 |
"id": channel["id"],
|
| 72 |
"name": channel["name"],
|
|
|
|
| 83 |
abort(404)
|
| 84 |
streams = {'streams': []}
|
| 85 |
|
| 86 |
+
if type in STREAMS and id in STREAMS[type]:
|
| 87 |
logging.debug(f"Found TV channel: {id}")
|
| 88 |
+
streams['streams'] = STREAMS[type][id]
|
| 89 |
else:
|
| 90 |
logging.debug(f"Handling movie or series: {id}")
|
| 91 |
if MYSTERIUS == "1":
|
|
|
|
| 120 |
if type != "channel":
|
| 121 |
abort(404)
|
| 122 |
|
| 123 |
+
for channel in STREAMS:
|
| 124 |
if channel["id"] == id:
|
| 125 |
return respond_with({
|
| 126 |
"meta": {
|