Allow empty schedule_days; add success flag to rescan endpoint

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
2026-06-28 16:38:48 +02:00
parent ac02dfd5c6
commit aeffb882dc
4 changed files with 3 additions and 37 deletions

View File

@@ -145,7 +145,7 @@ async def trigger_rescan(auth: dict = Depends(require_auth)) -> Dict[str, str]:
anime_service = get_anime_service(series_app)
await anime_service.rescan()
return {"message": "Rescan started successfully"}
return {"success": True, "message": "Rescan started successfully"}
except HTTPException:
raise

View File

@@ -112,8 +112,6 @@ class SchedulerConfig(BaseModel):
@classmethod
def validate_schedule_days(cls, v: List[str]) -> List[str]:
"""Validate each entry is a valid 3-letter lowercase day abbreviation."""
if not v:
raise ValueError("schedule_days cannot be empty")
invalid = [d for d in v if d not in _VALID_DAYS]
if invalid:
raise ValueError(