mirror of
https://github.com/EstrellaXD/Auto_Bangumi.git
synced 2026-04-26 03:21:21 +08:00
Fix custom_url caused bug in eps_complete.py
This commit is contained in:
10
src/main.py
10
src/main.py
@@ -31,6 +31,7 @@ async def restart():
|
||||
logger.info("Restarted")
|
||||
return {"status": "success"}
|
||||
|
||||
|
||||
@router.get("/api/v1/stop", tags=["program"])
|
||||
async def stop():
|
||||
global main_process
|
||||
@@ -54,6 +55,15 @@ async def start():
|
||||
return {"status": "success"}
|
||||
|
||||
|
||||
@router.get("/api/v1/status", tags=["program"])
|
||||
async def status():
|
||||
global main_process
|
||||
if main_process.is_alive():
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
|
||||
|
||||
if VERSION != "DEV_VERSION":
|
||||
router.mount("/assets", StaticFiles(directory="templates/assets"), name="assets")
|
||||
templates = Jinja2Templates(directory="templates")
|
||||
|
||||
Reference in New Issue
Block a user