diff --git a/app.py b/app.py index 05fd674..c9a1ccd 100644 --- a/app.py +++ b/app.py @@ -96,6 +96,15 @@ async def dashboard_preview(theme_id: str, ext: str): raise HTTPException(404) +@app.get("/scene/{scene_id}/preview.{ext}") +async def scene_preview(scene_id: str, ext: str): + from models.scene import SCENES_DIR + path = SCENES_DIR / scene_id / f"preview.{ext}" + if path.exists(): + return FileResponse(path) + raise HTTPException(404) + + @app.get("/scene/{scene_id}", response_class=HTMLResponse) async def scene_render(request: Request, scene_id: str): from models.scene import scene_manager