From e698e308262c36ac753c97478f20e43cca7267b3 Mon Sep 17 00:00:00 2001 From: mayun110 Date: Tue, 22 Aug 2023 23:48:08 +0800 Subject: [PATCH] =?UTF-8?q?fix=20#231=20=E4=B8=B4=E6=97=B6=E7=9B=AE?= =?UTF-8?q?=E5=BD=95=E9=97=AE=E9=A2=98=E6=88=96=E9=87=8D=E5=A4=8D=E9=80=9A?= =?UTF-8?q?=E7=9F=A5=E6=96=87=E4=BB=B6=E8=BD=AC=E7=A7=BB=E5=A4=B1=E8=B4=A5?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/modules/qbittorrent/qbittorrent.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/modules/qbittorrent/qbittorrent.py b/app/modules/qbittorrent/qbittorrent.py index 0639e282..5debbfc5 100644 --- a/app/modules/qbittorrent/qbittorrent.py +++ b/app/modules/qbittorrent/qbittorrent.py @@ -24,7 +24,7 @@ class Qbittorrent(metaclass=Singleton): self._host, self._port = StringUtils.get_domain_address(address=settings.QB_HOST, prefix=True) self._username = settings.QB_USER self._password = settings.QB_PASSWORD - if self._host and self._port and self._username and self._password: + if self._host and self._port: self.qbc = self.__login_qbittorrent() def __login_qbittorrent(self) -> Optional[Client]: @@ -83,7 +83,8 @@ class Qbittorrent(metaclass=Singleton): """ if not self.qbc: return None - torrents, error = self.get_torrents(status=["completed"], ids=ids, tags=tags) + # completed会包含移动状态 更改为获取活动上传状态和正在做种状态 + torrents, error = self.get_torrents(status=["stalled_uploading", "stalled"], ids=ids, tags=tags) return None if error else torrents or [] def get_downloading_torrents(self, ids: Union[str, list] = None,