This commit is contained in:
恍兮惚兮 2024-05-31 22:25:43 +08:00
parent 5f950ec20d
commit d17eab1f46
3 changed files with 9 additions and 5 deletions

View File

@ -2322,6 +2322,10 @@ class mdict(cishubase):
print_exc() print_exc()
def init(self): def init(self):
try:
with open("userconfig/mdict_config.json", "r", encoding="utf8") as ff:
self.extraconf = json.loads(ff.read())
except:
try: try:
with open("cache/mdict/config.json", "r", encoding="utf8") as ff: with open("cache/mdict/config.json", "r", encoding="utf8") as ff:
self.extraconf = json.loads(ff.read()) self.extraconf = json.loads(ff.read())
@ -2346,7 +2350,7 @@ class mdict(cishubase):
self.init_once_mdx(f) self.init_once_mdx(f)
try: try:
with open("cache/mdict/config.json", "w", encoding="utf8") as ff: with open("userconfig/mdict_config.json", "w", encoding="utf8") as ff:
ff.write(json.dumps(self.extraconf, ensure_ascii=False, indent=4)) ff.write(json.dumps(self.extraconf, ensure_ascii=False, indent=4))
except: except:
pass pass

View File

@ -4,4 +4,4 @@ PyQt5==5.15.10
PyQt5-Qt5==5.15.2 PyQt5-Qt5==5.15.2
webviewpy==1.2.0 webviewpy==1.2.0
pefile pefile
tinycss2==1.3.0 tinycss2

View File

@ -4,4 +4,4 @@ PyQt6==6.7.0
PyQt6-Qt6==6.7.0 PyQt6-Qt6==6.7.0
webviewpy==1.2.0 webviewpy==1.2.0
pefile pefile
tinycss2==1.3.0 tinycss2