From 23708b601f3e849990356e05ae0c879600933fec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E7=8E=B2=E8=BE=89?= Date: Thu, 16 May 2024 10:55:53 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A4=E6=96=AD=E8=BE=85=E7=A7=8D=E5=A4=B1?= =?UTF-8?q?=E8=B4=A5=E7=9A=84=E6=83=85=E5=86=B5=E4=B8=8B=EF=BC=8C=E6=98=AF?= =?UTF-8?q?=E5=90=A6=E6=98=AF=E7=94=B1=E4=BA=8Etoken=E6=9C=AA=E8=BF=9B?= =?UTF-8?q?=E8=A1=8C=E7=AB=99=E7=82=B9=E7=BB=91=E5=AE=9A=E5=AF=BC=E8=87=B4?= =?UTF-8?q?=E7=9A=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 3 ++- plugins/iyuuautoseed/__init__.py | 20 ++++++++++++-------- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index 0c88fe6..dec9fe5 100644 --- a/package.json +++ b/package.json @@ -244,11 +244,12 @@ "name": "IYUU自动辅种", "description": "基于IYUU官方Api实现自动辅种。", "labels": "做种,IYUU", - "version": "1.8", + "version": "1.8.1", "icon": "IYUU.png", "author": "jxxghp", "level": 2, "history": { + "v1.8.1": "判断辅种失败的情况下,是否是由于token未进行站点绑定导致的", "v1.8": "适配新版本IYUU开发版", "v1.7": "适配馒头最新变化,需要升级至v1.8.5+版本且维护好Authorization", "v1.6": "增加不辅种小体积种子功能", diff --git a/plugins/iyuuautoseed/__init__.py b/plugins/iyuuautoseed/__init__.py index b943c41..fc49dfe 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" + plugin_version = "1.8.1" # 插件作者 plugin_author = "jxxghp" # 作者主页 @@ -625,7 +625,11 @@ class IYUUAutoSeed(_PluginBase): # 查询可辅种数据 seed_list, msg = self.iyuuhelper.get_seed_info(hashs) if not isinstance(seed_list, dict): - logger.warn(f"当前种子列表没有可辅种的站点:{msg}") + # 判断辅种异常是否是由于Token未认证导致的,由于没有解决接口,只能从返回值来判断 + if self._token and msg == '请求缺少token': + logger.warn(f'IYUU辅种失败,疑似站点未绑定插件配置不完整,请先检查是否完成站点绑定!{msg}') + else: + logger.warn(f"当前种子列表没有可辅种的站点:{msg}") return else: logger.info(f"IYUU返回可辅种数:{len(seed_list)}") @@ -946,12 +950,12 @@ class IYUUAutoSeed(_PluginBase): logger.error("m-team站点的apikey未配置") return None res = RequestUtils( - headers={ - 'Content-Type': 'application/json', - 'User-Agent': f'{site.get("ua")}', - 'Accept': 'application/json, text/plain, */*', - 'x-api-key': apikey - } + headers={ + 'Content-Type': 'application/json', + 'User-Agent': f'{site.get("ua")}', + 'Accept': 'application/json, text/plain, */*', + 'x-api-key': apikey + } ).post_res(f"{site.get('url')}api/torrent/genDlToken", params={ 'id': tid })