diff --git a/LunaTranslator/LunaTranslator/cishu/mdict.py b/LunaTranslator/LunaTranslator/cishu/mdict.py index 3a671349..1f81fa6f 100644 --- a/LunaTranslator/LunaTranslator/cishu/mdict.py +++ b/LunaTranslator/LunaTranslator/cishu/mdict.py @@ -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 diff --git a/LunaTranslator/requirements.txt b/LunaTranslator/requirements.txt index d4ceafe3..25d8038e 100644 --- a/LunaTranslator/requirements.txt +++ b/LunaTranslator/requirements.txt @@ -4,4 +4,4 @@ PyQt5==5.15.10 PyQt5-Qt5==5.15.2 webviewpy==1.2.0 pefile -tinycss2==1.3.0 \ No newline at end of file +tinycss2 \ No newline at end of file diff --git a/LunaTranslator/requirements_qt6.txt b/LunaTranslator/requirements_qt6.txt index c7fc48d2..d9822685 100644 --- a/LunaTranslator/requirements_qt6.txt +++ b/LunaTranslator/requirements_qt6.txt @@ -4,4 +4,4 @@ PyQt6==6.7.0 PyQt6-Qt6==6.7.0 webviewpy==1.2.0 pefile -tinycss2==1.3.0 \ No newline at end of file +tinycss2 \ No newline at end of file