Spaces:
Paused
Paused
Update run.py
Browse files
run.py
CHANGED
|
@@ -65,9 +65,7 @@ def root():
|
|
| 65 |
|
| 66 |
@app.get('/catalog/{type}/{id}.json')
|
| 67 |
def addon_catalog(type, id):
|
| 68 |
-
print(f"Debug: Received request for /catalog/",type,id)
|
| 69 |
if type != "tv":
|
| 70 |
-
print("Debug: Type is not 'tv'")
|
| 71 |
raise HTTPException(status_code=404)
|
| 72 |
|
| 73 |
catalogs = {"metas": []}
|
|
@@ -79,18 +77,15 @@ def addon_catalog(type, id):
|
|
| 79 |
"poster": channel["poster"], # Add poster URL if available
|
| 80 |
"description": f"Watch {channel['title']}"
|
| 81 |
})
|
| 82 |
-
print(f"Debug: Returning catalogs: {catalogs}")
|
| 83 |
return respond_with(catalogs)
|
| 84 |
|
| 85 |
@app.get('/meta/{type}/{id}.json')
|
| 86 |
def addon_meta(type, id):
|
| 87 |
-
print(f"Request for meta: type={type}, id={id}")
|
| 88 |
if type != "tv":
|
| 89 |
raise HTTPException(status_code=404)
|
| 90 |
|
| 91 |
for channel in STREAM["channels"]:
|
| 92 |
if channel["id"] == id:
|
| 93 |
-
print(f"Found channel metadata: {channel}")
|
| 94 |
meta = {
|
| 95 |
"id": id,
|
| 96 |
"type": "tv",
|
|
|
|
| 65 |
|
| 66 |
@app.get('/catalog/{type}/{id}.json')
|
| 67 |
def addon_catalog(type, id):
|
|
|
|
| 68 |
if type != "tv":
|
|
|
|
| 69 |
raise HTTPException(status_code=404)
|
| 70 |
|
| 71 |
catalogs = {"metas": []}
|
|
|
|
| 77 |
"poster": channel["poster"], # Add poster URL if available
|
| 78 |
"description": f"Watch {channel['title']}"
|
| 79 |
})
|
|
|
|
| 80 |
return respond_with(catalogs)
|
| 81 |
|
| 82 |
@app.get('/meta/{type}/{id}.json')
|
| 83 |
def addon_meta(type, id):
|
|
|
|
| 84 |
if type != "tv":
|
| 85 |
raise HTTPException(status_code=404)
|
| 86 |
|
| 87 |
for channel in STREAM["channels"]:
|
| 88 |
if channel["id"] == id:
|
|
|
|
| 89 |
meta = {
|
| 90 |
"id": id,
|
| 91 |
"type": "tv",
|