优化加载页面

This commit is contained in:
shuaikangzhou
2023-02-02 00:26:44 +08:00
parent d848a80b32
commit efe314d5e6
38 changed files with 254 additions and 5660 deletions
+9 -5
View File
@@ -72,7 +72,7 @@ if os.path.exists('./app/DataBase/Msg.db'):
# '''创建游标'''
cursor = DB.cursor()
if os.path.exists('./Msg.db'):
DB = sqlite3.connect("./Msg.db")
DB = sqlite3.connect("./Msg.db", check_same_thread=False)
# '''创建游标'''
cursor = DB.cursor()
@@ -110,7 +110,7 @@ def decrypt(db, key):
p = os.system(f"{os.path.abspath('.')}{cmd} {db} < ./app/DataBase/config.txt")
global DB
global cursor
DB = sqlite3.connect("./app/DataBase/Msg.db")
DB = sqlite3.connect("./app/DataBase/Msg.db", check_same_thread=False)
# '''创建游标'''
cursor = DB.cursor()
@@ -249,9 +249,13 @@ def get_emoji(imgPath):
from EmojiInfo
where md5=?
'''
cursor.execute(sql, [imgPath])
result = cursor.fetchone()
download_emoji(newPath, result[0])
try:
cursor.execute(sql, [imgPath])
result = cursor.fetchone()
download_emoji(newPath, result[0])
except sqlite3.ProgrammingError as e:
print(e, imgPath)
return False
return newPath