feat: auto cleanup with retention period, storage limit, settings UI

This commit is contained in:
mini
2026-02-18 23:47:33 +08:00
parent 5bc7f8d1df
commit f106763723
7 changed files with 434 additions and 2 deletions

View File

@@ -109,3 +109,23 @@ class DownloadLogListResponse(BaseModel):
total: int
page: int
page_size: int
class CleanupConfig(BaseModel):
enabled: bool = True
retention_minutes: int = 10080 # 7 days
storage_limit_pct: int = 80
class DiskStats(BaseModel):
total: int
used: int
free: int
used_pct: float
class CleanupStatus(BaseModel):
config: CleanupConfig
disk: DiskStats
last_run: str = ""
last_result: dict = {}