This commit is contained in:
恍兮惚兮 2024-09-16 20:19:18 +08:00
parent 18c24a9a5f
commit a02cdb5cce
3 changed files with 9 additions and 7 deletions

View File

@ -300,15 +300,15 @@ class AnkiWindow(QWidget):
model_htmlback = self.backtext.toPlainText()
model_css = self.csstext.toPlainText()
with open(
gobject.getuserconfigdir("anki/back.html"), "w", encoding="utf8"
gobject.getuserconfigdir("anki_2/back.html"), "w", encoding="utf8"
) as ff:
ff.write(model_htmlback)
with open(
gobject.getuserconfigdir("anki/front.html"), "w", encoding="utf8"
gobject.getuserconfigdir("anki_2/front.html"), "w", encoding="utf8"
) as ff:
ff.write(model_htmlfront)
with open(
gobject.getuserconfigdir("anki/style.css"), "w", encoding="utf8"
gobject.getuserconfigdir("anki_2/style.css"), "w", encoding="utf8"
) as ff:
ff.write(model_css)
@ -637,11 +637,11 @@ class AnkiWindow(QWidget):
def tryloadankitemplates(self):
try:
with open("userconfig/anki/back.html", "r", encoding="utf8") as ff:
with open("userconfig/anki_2/back.html", "r", encoding="utf8") as ff:
model_htmlback = ff.read()
with open("userconfig/anki/front.html", "r", encoding="utf8") as ff:
with open("userconfig/anki_2/front.html", "r", encoding="utf8") as ff:
model_htmlfront = ff.read()
with open("userconfig/anki/style.css", "r", encoding="utf8") as ff:
with open("userconfig/anki_2/style.css", "r", encoding="utf8") as ff:
model_css = ff.read()
except:
with open("files/anki/back.html", "r", encoding="utf8") as ff:

View File

@ -62,6 +62,7 @@ class playtimemanager:
self.sqlsavegameinfo.execute(
"INSERT INTO gameinternalid_v2 VALUES(NULL,?)", (gameuid,)
)
self.sqlsavegameinfo.commit()
else:
return ret[0]
@ -78,6 +79,7 @@ class playtimemanager:
"UPDATE traceplaytime_v4 SET timestop = ? WHERE (gameinternalid = ? and timestart = ?)",
(end, gameinternalid, start),
)
self.sqlsavegameinfo.commit()
def checkgameplayingthread(self):
self.__currentexe = None

View File

@ -29,7 +29,7 @@ include(generate_product_version)
set(VERSION_MAJOR 5)
set(VERSION_MINOR 36)
set(VERSION_PATCH 3)
set(VERSION_PATCH 4)
add_library(pch pch.cpp)
target_precompile_headers(pch PUBLIC pch.h)