feat: update plugin versions to 1.9.14 and 2.17, fix issues with expired site hash values

This commit is contained in:
jxxghp
2026-06-08 14:40:26 +08:00
parent 465ce39f6f
commit 692205095c
6 changed files with 32 additions and 18 deletions

View File

@@ -327,11 +327,12 @@
"name": "IYUU自动辅种",
"description": "基于IYUU官方Api实现自动辅种。",
"labels": "做种,IYUU",
"version": "1.9.13",
"version": "1.9.14",
"icon": "IYUU.png",
"author": "jxxghp",
"level": 2,
"history": {
"v1.9.14": "修复由于站点哈希值过期导致辅种失败的问题,并优化代码逻辑",
"v1.9.13": "限制辅种缓存大小并重置运行期校验队列,避免长期运行缓存无限增长",
"v1.9.12": "修复海豹不能辅种的问题",
"v1.9.11": "修复馒头不能辅种的问题",

View File

@@ -273,11 +273,12 @@
"name": "IYUU自动辅种",
"description": "基于IYUU官方Api实现自动辅种。",
"labels": "做种,IYUU",
"version": "2.16",
"version": "2.17",
"icon": "IYUU.png",
"author": "jxxghp,CKun",
"level": 2,
"history": {
"v2.17": "修复由于站点哈希值过期导致辅种失败的问题,并优化代码逻辑",
"v2.16": "限制辅种缓存大小并重置运行期校验队列,避免长期运行缓存无限增长",
"v2.15": "修复海豹不能辅种的问题",
"v2.14": "修复馒头不能辅种的问题",

View File

@@ -34,7 +34,7 @@ class IYUUAutoSeed(_PluginBase):
# 插件图标
plugin_icon = "IYUU.png"
# 插件版本
plugin_version = "2.16"
plugin_version = "2.17"
# 插件作者
plugin_author = "jxxghp,CKun"
# 作者主页

View File

@@ -90,6 +90,15 @@ class IyuuHelper(object):
return result.get('sid_sha1')
return None
def __reseed_index(self, json_data: str, sha1: str) -> Tuple[Optional[dict], str]:
return self.__request_iyuu(url='/reseed/index/index', method='post', params={
'hash': json_data,
'sha1': sha1,
'sid_sha1': self._sid_sha1,
'timestamp': int(time.time()),
'version': self._version
})
def get_seed_info(self, info_hashs: list) -> Tuple[Optional[dict], str]:
"""
返回info_hash对应的站点id、种子id
@@ -101,13 +110,10 @@ class IyuuHelper(object):
info_hashs.sort()
json_data = json.dumps(info_hashs, separators=(',', ':'), ensure_ascii=False)
sha1 = self.get_sha1(json_data)
result, msg = self.__request_iyuu(url='/reseed/index/index', method='post', params={
'hash': json_data,
'sha1': sha1,
'sid_sha1': self._sid_sha1,
'timestamp': int(time.time()),
'version': self._version
})
result, msg = self.__reseed_index(json_data, sha1)
if msg and "站点哈希值 require" in msg:
self._sid_sha1 = self.__report_existing()
result, msg = self.__reseed_index(json_data, sha1)
return result, msg
@staticmethod

View File

@@ -35,7 +35,7 @@ class IYUUAutoSeed(_PluginBase):
# 插件图标
plugin_icon = "IYUU.png"
# 插件版本
plugin_version = "1.9.13"
plugin_version = "1.9.14"
# 插件作者
plugin_author = "jxxghp"
# 作者主页

View File

@@ -90,6 +90,15 @@ class IyuuHelper(object):
return result.get('sid_sha1')
return None
def __reseed_index(self, json_data: str, sha1: str) -> Tuple[Optional[dict], str]:
return self.__request_iyuu(url='/reseed/index/index', method='post', params={
'hash': json_data,
'sha1': sha1,
'sid_sha1': self._sid_sha1,
'timestamp': int(time.time()),
'version': self._version
})
def get_seed_info(self, info_hashs: list) -> Tuple[Optional[dict], str]:
"""
返回info_hash对应的站点id、种子id
@@ -101,13 +110,10 @@ class IyuuHelper(object):
info_hashs.sort()
json_data = json.dumps(info_hashs, separators=(',', ':'), ensure_ascii=False)
sha1 = self.get_sha1(json_data)
result, msg = self.__request_iyuu(url='/reseed/index/index', method='post', params={
'hash': json_data,
'sha1': sha1,
'sid_sha1': self._sid_sha1,
'timestamp': int(time.time()),
'version': self._version
})
result, msg = self.__reseed_index(json_data, sha1)
if msg and "站点哈希值 require" in msg:
self._sid_sha1 = self.__report_existing()
result, msg = self.__reseed_index(json_data, sha1)
return result, msg
@staticmethod