Skip to content

Commit

Permalink
修复部分聊天记录重复的问题LC044#48 LC044#36
Browse files Browse the repository at this point in the history
  • Loading branch information
LC044 committed Dec 4, 2023
1 parent 7b3774c commit db417dc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
16 changes: 9 additions & 7 deletions app/DataBase/hard_link.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,15 @@

@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 = {}
Expand Down
2 changes: 1 addition & 1 deletion app/ui_pc/tool/pc_decrypt/pc_decrypt.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ def btnExitClicked(self):
# 目标数据库文件
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) # 使用一个数据库文件作为模板
# 合并数据库
Expand Down

0 comments on commit db417dc

Please sign in to comment.