mirror of
https://github.com/HIllya51/LunaTranslator.git
synced 2024-12-28 08:04:13 +08:00
...
This commit is contained in:
parent
5f950ec20d
commit
d17eab1f46
@ -2323,10 +2323,14 @@ class mdict(cishubase):
|
||||
|
||||
def init(self):
|
||||
try:
|
||||
with open("cache/mdict/config.json", "r", encoding="utf8") as ff:
|
||||
with open("userconfig/mdict_config.json", "r", encoding="utf8") as ff:
|
||||
self.extraconf = json.loads(ff.read())
|
||||
except:
|
||||
self.extraconf = {}
|
||||
try:
|
||||
with open("cache/mdict/config.json", "r", encoding="utf8") as ff:
|
||||
self.extraconf = json.loads(ff.read())
|
||||
except:
|
||||
self.extraconf = {}
|
||||
self.sql = None
|
||||
paths = self.config["path"]
|
||||
|
||||
@ -2346,7 +2350,7 @@ class mdict(cishubase):
|
||||
self.init_once_mdx(f)
|
||||
|
||||
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))
|
||||
except:
|
||||
pass
|
||||
|
@ -4,4 +4,4 @@ PyQt5==5.15.10
|
||||
PyQt5-Qt5==5.15.2
|
||||
webviewpy==1.2.0
|
||||
pefile
|
||||
tinycss2==1.3.0
|
||||
tinycss2
|
@ -4,4 +4,4 @@ PyQt6==6.7.0
|
||||
PyQt6-Qt6==6.7.0
|
||||
webviewpy==1.2.0
|
||||
pefile
|
||||
tinycss2==1.3.0
|
||||
tinycss2
|
Loading…
x
Reference in New Issue
Block a user