diff --git a/app/main.py b/app/main.py index d6da3b8..c79a1b5 100644 --- a/app/main.py +++ b/app/main.py @@ -123,7 +123,10 @@ async def webpage(request: Request): @app.get("/dropout", include_in_schema=False) async def webpage(request: Request): + global cached_data + if cached_data is None: + await dropoutUpdate() try: - return templates.TemplateResponse("dropout.html", {"request": request, "shows": shows()}) + return templates.TemplateResponse("dropout.html", {"request": request, "shows": await shows()}) except Exception as e: return JSONResponse(status_code=500, content={"status": "error", "message": str(e)})