feat: 加入 recheck 功能,在本地文件被删除后重新标记为未下载

This commit is contained in:
amtoaer
2023-11-26 12:51:27 +08:00
parent eee99d9fda
commit dc612ec6f1
2 changed files with 44 additions and 0 deletions

View File

@@ -4,6 +4,7 @@ import sys
import uvloop
from loguru import logger
from commands import recheck
from models import init_model
from processor import cleanup, process
from settings import settings
@@ -18,6 +19,11 @@ async def entry() -> None:
logger.info("Running once...")
await process()
return
if any("recheck" in _ for _ in sys.argv):
# 重新检查
logger.info("Rechecking...")
await recheck()
return
logger.info("Running daemon...")
while True:
await process()