From 08a2b719f56e30301b924873e0a3e33391e263dc Mon Sep 17 00:00:00 2001 From: zhao <285929232@qq.com> Date: Sat, 26 Oct 2024 02:11:37 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BE=85=E7=A7=8D=E7=BB=93=E6=9D=9F=E5=90=8E?= =?UTF-8?q?=EF=BC=8C=E4=B8=80=E8=B5=B7=E5=BC=80=E5=A7=8B=E6=89=80=E6=9C=89?= =?UTF-8?q?=E8=BE=85=E7=A7=8D=E5=90=8E=E6=9A=82=E5=81=9C=E7=9A=84=E7=A7=8D?= =?UTF-8?q?=E5=AD=90=EF=BC=88=E6=8E=92=E9=99=A4=E4=BA=86=E5=87=BA=E9=94=99?= =?UTF-8?q?=E7=9A=84=E7=A7=8D=E5=AD=90=EF=BC=89=EF=BC=8C=E5=8D=B3=E4=BD=BF?= =?UTF-8?q?=E4=BA=BA=E5=B7=A5=E7=A1=AE=E8=AE=A4=E4=B9=9F=E6=98=AF=E6=89=8B?= =?UTF-8?q?=E5=8A=A8=E5=BC=80=E5=A7=8B=E8=BF=99=E9=83=A8=E5=88=86=E7=A7=8D?= =?UTF-8?q?=E5=AD=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/iyuuautoseed/__init__.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/plugins/iyuuautoseed/__init__.py b/plugins/iyuuautoseed/__init__.py index 64e4f2f6..e1d8501e 100644 --- a/plugins/iyuuautoseed/__init__.py +++ b/plugins/iyuuautoseed/__init__.py @@ -633,6 +633,21 @@ def auto_seed(self): self.check_recheck() else: logger.info(f"没有需要辅种的种子") + #qb 中,辅种结束后,一起开始所有辅种后暂停的种子(排除了出错的种子),及时人工确认也是手动开始这部分种子 + for downloader in self._downloaders: + # 只处理 qb + if downloader == "qbittorrent": + downloader_obj = self.__get_downloader(downloader) + paused_torrents, _ = downloader_obj.get_torrents(status=["paused"]) + # errored_torrents, _ = downloader_obj.get_torrents(status=["errored"]) + pausedUP_torrent_hashs = [] + for torrent in paused_torrents: + if 'pausedUP' == torrent.state: + pausedUP_torrent_hashs.append(torrent.hash) + logger.info(f"下载器 {downloader} 自动开始种子 {torrent.name}") + else: + logger.info(f"下载器 {downloader} 不自动开始种子 {torrent.name}, state={torrent.state}") + downloader_obj.start_torrents(ids=pausedUP_torrent_hashs) # 保存缓存 self.__update_config() # 发送消息