We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 786f92c commit 65bada4Copy full SHA for 65bada4
1 file changed
epub_browser/processor.py
@@ -18,7 +18,7 @@ class EPUBProcessor:
18
def __init__(self, epub_path, output_dir=None):
19
self.epub_path = epub_path
20
self.output_dir = output_dir
21
- self.book_hash = hashlib.md5(epub_path.encode()).hexdigest()[:8] # 使用哈希值作为标识,后续可能会根据 ncx 更新
+ self.book_hash = base64.urlsafe_b64encode(hashlib.md5(epub_path.encode('utf-8')).digest()).decode().rstrip('=') # 使用哈希值作为标识,后续可能会根据 ncx 更新
22
23
if output_dir:
24
# 使用用户指定的输出目录
0 commit comments