diff --git a/app/main.py b/app/main.py index 5dfad07..3ff0dbb 100644 --- a/app/main.py +++ b/app/main.py @@ -102,14 +102,14 @@ async def dropoutSeries(): except: return JSONResponse(content={"error": "File not found"}, status_code=404) -async def get_show_data(show: str): +async def get_show_data(show: str, force: bool = False): global cached_data if cached_data is None: await dropoutUpdate() for item in cached_data: if show == item["SHOW"] or show == item["LINK"]: - if "SEASONS" not in item: + if "SEASONS" not in item or force is not False: item['SEASONS'] = download.grab.season(item['URL']) return item return None @@ -134,7 +134,7 @@ async def dropoutDownload( ): try: if latest is not False and season is None: - item = await get_show_data(show) + item = await get_show_data(show,True) if not item: return JSONResponse(status_code=404, content={"status": "error", "message": "Show not found"}) season = get_latest_season(item)