修复依赖问题

This commit is contained in:
ljmeng
2024-03-27 23:29:55 +08:00
parent 6c950ef7ca
commit 2b8f5553ec
3 changed files with 5 additions and 5 deletions

View File

@@ -186,7 +186,7 @@
"CrossSeed": {
"name": "青蛙辅种助手",
"description": "参考ReseedPuppy和IYUU辅种插件实现自动辅种支持站点青蛙、AGSVPT、麒麟、UBits、聆音等。",
"version": "1.5",
"version": "1.6",
"icon": "qingwa.png",
"author": "233@qingwa",
"level": 2

View File

@@ -36,7 +36,7 @@ class CrossSeed(_PluginBase):
# 插件图标
plugin_icon = "qingwa.png"
# 插件版本
plugin_version = "1.5"
plugin_version = "1.6"
# 插件作者
plugin_author = "233@qingwa"
# 作者主页

View File

@@ -3,7 +3,7 @@ from pathlib import Path
from typing import Self
import requests
from bencode import decode, encode
from bencode import bdecode, bencode
class CSSiteConfig(object):
@@ -60,10 +60,10 @@ class TorInfo:
@staticmethod
def from_data(data: bytes) -> tuple[Self, str]:
try:
torrent = decode(data)
torrent = bdecode(data)
info = torrent["info"]
pieces = info["pieces"]
info_hash = hashlib.sha1(encode(info)).hexdigest()
info_hash = hashlib.sha1(bencode(info)).hexdigest()
pieces_hash = hashlib.sha1(pieces).hexdigest()
local_tor = TorInfo(info_hash=info_hash, pieces_hash=pieces_hash)
#从种子中获取 announce, qb可能存在获取不到的情况会存在于fastresume文件中