From 36b7e711cafd9e3bae14205a035122071fb02bad Mon Sep 17 00:00:00 2001 From: hoey94 Date: Wed, 13 Mar 2024 22:00:50 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20QB=E8=BF=9C=E7=A8=8B=E6=93=8D=E4=BD=9C?= =?UTF-8?q?=E5=8D=95=E7=8B=AC=E8=AE=BE=E7=BD=AE=E6=9A=82=E5=81=9C=E5=91=A8?= =?UTF-8?q?=E6=9C=9F=E6=88=96=E5=BC=80=E5=A7=8B=E5=91=A8=E6=9C=9F=E5=A4=B1?= =?UTF-8?q?=E6=95=88=E9=97=AE=E9=A2=981677?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/qbcommand/__init__.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/plugins/qbcommand/__init__.py b/plugins/qbcommand/__init__.py index d705713..8db13f9 100644 --- a/plugins/qbcommand/__init__.py +++ b/plugins/qbcommand/__init__.py @@ -162,6 +162,26 @@ class QbCommond(_PluginBase): "kwargs": {}, }, ] + if self._enabled and self._pause_cron: + return [ + { + "id": "QbPause", + "name": "暂停QB所有任务", + "trigger": CronTrigger.from_crontab(self._pause_cron), + "func": self.pause_torrent, + "kwargs": {}, + } + ] + if self._enabled and self._resume_cron: + return [ + { + "id": "QbResume", + "name": "开始QB所有任务", + "trigger": CronTrigger.from_crontab(self._resume_cron), + "func": self.resume_torrent, + "kwargs": {}, + } + ] return [] def get_all_torrents(self):