From 2f595c6ba738c3d8974bb228b8ecad9b1250caad Mon Sep 17 00:00:00 2001 From: John Connor Date: Mon, 20 May 2024 22:56:18 +0800 Subject: [PATCH 1/3] =?UTF-8?q?feat:=20IYUU=20=E8=BE=85=E7=A7=8D=E6=94=AF?= =?UTF-8?q?=E6=8C=81=20qBittorrent=20=E8=B7=B3=E8=BF=87=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 3 ++- plugins/iyuuautoseed/__init__.py | 27 ++++++++++++++++++++++++--- 2 files changed, 26 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 434c879..de6a714 100644 --- a/package.json +++ b/package.json @@ -246,11 +246,12 @@ "name": "IYUU自动辅种", "description": "基于IYUU官方Api实现自动辅种。", "labels": "做种,IYUU", - "version": "1.8.1", + "version": "1.8.2", "icon": "IYUU.png", "author": "jxxghp", "level": 2, "history": { + "v1.8.2": "qBittorrent 支持跳过校验", "v1.8.1": "判断辅种失败的情况下,是否是由于token未进行站点绑定导致的", "v1.8": "适配新版本IYUU开发版", "v1.7": "适配馒头最新变化,需要升级至v1.8.5+版本且维护好Authorization", diff --git a/plugins/iyuuautoseed/__init__.py b/plugins/iyuuautoseed/__init__.py index fc49dfe..e72634e 100644 --- a/plugins/iyuuautoseed/__init__.py +++ b/plugins/iyuuautoseed/__init__.py @@ -57,6 +57,7 @@ class IYUUAutoSeed(_PluginBase): # 开关 _enabled = False _cron = None + _skipverify = False _onlyonce = False _token = None _downloaders = [] @@ -100,6 +101,7 @@ class IYUUAutoSeed(_PluginBase): # 读取配置 if config: self._enabled = config.get("enabled") + self._skipverify = config.get("skipverify") self._onlyonce = config.get("onlyonce") self._cron = config.get("cron") self._token = config.get("token") @@ -388,7 +390,23 @@ class IYUUAutoSeed(_PluginBase): 'component': 'VCol', 'props': { 'cols': 12, - 'md': 6 + 'md': 4 + }, + 'content': [ + { + 'component': 'VSwitch', + 'props': { + 'model': 'skipverify', + 'label': '跳过校验(仅qB有效)', + } + } + ] + }, + { + 'component': 'VCol', + 'props': { + 'cols': 12, + 'md': 4 }, 'content': [ { @@ -404,7 +422,7 @@ class IYUUAutoSeed(_PluginBase): 'component': 'VCol', 'props': { 'cols': 12, - 'md': 6 + 'md': 4 }, 'content': [ { @@ -422,6 +440,7 @@ class IYUUAutoSeed(_PluginBase): } ], { "enabled": False, + "skipverify": False, "onlyonce": False, "notify": False, "clearcache": False, @@ -440,6 +459,7 @@ class IYUUAutoSeed(_PluginBase): def __update_config(self): self.update_config({ "enabled": self._enabled, + "skipverify": self._skipverify, "onlyonce": self._onlyonce, "clearcache": self._clearcache, "cron": self._cron, @@ -738,7 +758,8 @@ class IYUUAutoSeed(_PluginBase): state = self.qb.add_torrent(content=content, download_dir=save_path, is_paused=True, - tag=["已整理", "辅种", tag]) + tag=["已整理", "辅种", tag], + is_skip_checking=self._skipverify) if not state: return None else: From e6549bfc8014d7b186139f73fa4955ec7f2ee29c Mon Sep 17 00:00:00 2001 From: John Connor Date: Mon, 20 May 2024 23:05:12 +0800 Subject: [PATCH 2/3] =?UTF-8?q?fix:=20=E8=B7=B3=E8=BF=87=E6=A0=A1=E9=AA=8C?= =?UTF-8?q?=E4=B9=8B=E5=90=8E=E4=B8=8D=E8=BF=BD=E5=8A=A0=E6=A0=A1=E9=AA=8C?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/iyuuautoseed/__init__.py | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/plugins/iyuuautoseed/__init__.py b/plugins/iyuuautoseed/__init__.py index e72634e..0ef4966 100644 --- a/plugins/iyuuautoseed/__init__.py +++ b/plugins/iyuuautoseed/__init__.py @@ -880,17 +880,21 @@ class IYUUAutoSeed(_PluginBase): return False else: self.success += 1 - # 追加校验任务 - logger.info(f"添加校验检查任务:{download_id} ...") - if not self._recheck_torrents.get(downloader): - self._recheck_torrents[downloader] = [] - self._recheck_torrents[downloader].append(download_id) + if self._skipverify: + # 跳过校验 + logger.info(f"{download_id} 跳过校验,请自行检查...") + else: + # 追加校验任务 + logger.info(f"添加校验检查任务:{download_id} ...") + if not self._recheck_torrents.get(downloader): + self._recheck_torrents[downloader] = [] + self._recheck_torrents[downloader].append(download_id) + # TR会自动校验 + if downloader == "qbittorrent": + # 开始校验种子 + downloader_obj.recheck_torrents(ids=[download_id]) # 下载成功 logger.info(f"成功添加辅种下载,站点:{site_info.get('name')},种子链接:{torrent_url}") - # TR会自动校验 - if downloader == "qbittorrent": - # 开始校验种子 - downloader_obj.recheck_torrents(ids=[download_id]) # 成功也加入缓存,有一些改了路径校验不通过的,手动删除后,下一次又会辅上 self._success_caches.append(seed.get("info_hash")) return True From 72d03c5658a470b8815e3ee5145be7fddfd2e100 Mon Sep 17 00:00:00 2001 From: John Connor Date: Tue, 21 May 2024 00:03:22 +0800 Subject: [PATCH 3/3] =?UTF-8?q?fix=20=E6=9B=B4=E6=96=B0=20iyuuautoseed=20?= =?UTF-8?q?=E6=8F=92=E4=BB=B6=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/iyuuautoseed/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/iyuuautoseed/__init__.py b/plugins/iyuuautoseed/__init__.py index 0ef4966..5351e81 100644 --- a/plugins/iyuuautoseed/__init__.py +++ b/plugins/iyuuautoseed/__init__.py @@ -34,7 +34,7 @@ class IYUUAutoSeed(_PluginBase): # 插件图标 plugin_icon = "IYUU.png" # 插件版本 - plugin_version = "1.8.1" + plugin_version = "1.8.2" # 插件作者 plugin_author = "jxxghp" # 作者主页