mirror of
https://github.com/LC044/WeChatMsg
synced 2024-11-14 05:21:41 +08:00
处理音频合并相同两行的情况
This commit is contained in:
parent
3d68f99780
commit
62febf63c7
@ -20,10 +20,13 @@ def merge_MediaMSG_databases(source_paths, target_path):
|
||||
cursor.execute(sql)
|
||||
result = cursor.fetchall()
|
||||
# 附加源数据库
|
||||
target_cursor.executemany(
|
||||
"INSERT INTO Media (Key,Reserved0,Buf,Reserved1,Reserved2)"
|
||||
"VALUES(?,?,?,?,?)",
|
||||
result)
|
||||
try:
|
||||
target_cursor.executemany(
|
||||
"INSERT INTO Media (Key,Reserved0,Buf,Reserved1,Reserved2)"
|
||||
"VALUES(?,?,?,?,?)",
|
||||
result)
|
||||
except sqlite3.IntegrityError:
|
||||
print("有重复key", "跳过")
|
||||
cursor.close()
|
||||
db.close()
|
||||
# 提交事务
|
||||
|
Loading…
Reference in New Issue
Block a user