From 24d75058ad0be5ffa76093293f8b7194245c91b5 Mon Sep 17 00:00:00 2001 From: jxxghp Date: Tue, 15 Aug 2023 18:25:10 +0800 Subject: [PATCH] =?UTF-8?q?feat=20=E5=A2=9E=E5=8A=A0=E4=B8=8B=E8=BD=BD?= =?UTF-8?q?=E5=99=A8=E7=9B=91=E6=8E=A7=E8=AE=BE=E7=BD=AE=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 1 + app/core/config.py | 2 ++ app/scheduler.py | 3 ++- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 0e23b916..906ceec9 100644 --- a/README.md +++ b/README.md @@ -99,6 +99,7 @@ docker pull jxxghp/moviepilot:latest **DOWNLOADER:** 下载器,支持`qbittorrent`/`transmission`,QB版本号要求>= 4.3.9,TR版本号要求>= 3.0,同时还需要配置对应渠道的环境变量,非对应渠道的变量可删除,推荐使用`qbittorrent` +**DOWNLOADER_MONITOR:** 下载器监控,`true`/`false`,默认为`true`,开启后下载完成时才会自动整理入库 `qbittorrent`设置项: diff --git a/app/core/config.py b/app/core/config.py index 29368439..499fc083 100644 --- a/app/core/config.py +++ b/app/core/config.py @@ -97,6 +97,8 @@ class Settings(BaseSettings): SLACK_CHANNEL: str = "" # 下载器 qbittorrent/transmission DOWNLOADER: str = "qbittorrent" + # 下载器监控开关 + DOWNLOADER_MONITOR: bool = True # Qbittorrent地址,IP:PORT QB_HOST: str = None # Qbittorrent用户名 diff --git a/app/scheduler.py b/app/scheduler.py index 66a08d5c..88f7af7d 100644 --- a/app/scheduler.py +++ b/app/scheduler.py @@ -75,7 +75,8 @@ class Scheduler(metaclass=Singleton): minutes=30, name="自定义订阅刷新") # 下载器文件转移(每5分钟) - self._scheduler.add_job(TransferChain().process, "interval", minutes=5, name="下载文件整理") + if settings.DOWNLOADER_MONITOR: + self._scheduler.add_job(TransferChain().process, "interval", minutes=5, name="下载文件整理") # 公共定时服务 self._scheduler.add_job(SchedulerChain().scheduler_job, "interval", minutes=10)