Skip to content

Commit 65bada4

Browse files
committed
feat: use full md5 hash
1 parent 786f92c commit 65bada4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

epub_browser/processor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class EPUBProcessor:
1818
def __init__(self, epub_path, output_dir=None):
1919
self.epub_path = epub_path
2020
self.output_dir = output_dir
21-
self.book_hash = hashlib.md5(epub_path.encode()).hexdigest()[:8] # 使用哈希值作为标识,后续可能会根据 ncx 更新
21+
self.book_hash = base64.urlsafe_b64encode(hashlib.md5(epub_path.encode('utf-8')).digest()).decode().rstrip('=') # 使用哈希值作为标识,后续可能会根据 ncx 更新
2222

2323
if output_dir:
2424
# 使用用户指定的输出目录

0 commit comments

Comments
 (0)