mirror of
https://github.com/LC044/WeChatMsg
synced 2025-02-21 01:52:35 +08:00
修复部分聊天记录重复的问题#48 #36
This commit is contained in:
parent
7b3774cea9
commit
db417dc48f
@ -14,13 +14,15 @@ root_path = 'FileStorage/MsgAttach/'
|
||||
|
||||
@log
|
||||
def get_md5_from_xml(content):
|
||||
# 解析XML
|
||||
root = ET.fromstring(content)
|
||||
# 提取md5的值
|
||||
md5_value = root.find(".//img").get("md5")
|
||||
# print(md5_value)
|
||||
return md5_value
|
||||
|
||||
try:
|
||||
# 解析XML
|
||||
root = ET.fromstring(content)
|
||||
# 提取md5的值
|
||||
md5_value = root.find(".//img").get("md5")
|
||||
# print(md5_value)
|
||||
return md5_value
|
||||
except ET.ParseError:
|
||||
return None
|
||||
|
||||
def singleton(cls):
|
||||
_instance = {}
|
||||
|
@ -171,7 +171,7 @@ class DecryptControl(QWidget, decryptUi.Ui_Dialog):
|
||||
# 目标数据库文件
|
||||
target_database = "app/DataBase/Msg/MSG.db"
|
||||
# 源数据库文件列表
|
||||
source_databases = [f"app/DataBase/Msg/MSG{i}.db" for i in range(20)]
|
||||
source_databases = [f"app/DataBase/Msg/MSG{i}.db" for i in range(1,20)]
|
||||
import shutil
|
||||
shutil.copy("app/DataBase/Msg/MSG0.db", target_database) # 使用一个数据库文件作为模板
|
||||
# 合并数据库
|
||||
|
Loading…
Reference in New Issue
Block a user