From fad30d6fe20bcec32b3aa4fa4b8d1604ea17540b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=81=8D=E5=85=AE=E6=83=9A=E5=85=AE?= <101191390+HIllya51@users.noreply.github.com> Date: Wed, 4 Sep 2024 06:22:38 +0800 Subject: [PATCH] Revert --- .../LunaTranslator/translator/basetranslator_dev.py | 6 ++++-- plugins/CMakeLists.txt | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/LunaTranslator/LunaTranslator/translator/basetranslator_dev.py b/LunaTranslator/LunaTranslator/translator/basetranslator_dev.py index 32fd4fdb..2cb9d6c2 100644 --- a/LunaTranslator/LunaTranslator/translator/basetranslator_dev.py +++ b/LunaTranslator/LunaTranslator/translator/basetranslator_dev.py @@ -46,8 +46,10 @@ class Commonloadchromium: statuslabelsettext(self, "端口冲突") def gencmd(self, path, port): - fmt = '"%s" --remote-allow-origins=* --remote-debugging-port=%d ' - call = fmt % (path, port) + hash_ = hashlib.md5(path.encode("utf8")).hexdigest() + cache = os.path.abspath(os.path.join("chrome_cache", hash_)) + fmt = '"%s" --disable-extensions --remote-allow-origins=* --disable-gpu --no-first-run --remote-debugging-port=%d --user-data-dir="%s"' + call = fmt % (path, port, cache) return call def getpath(self): diff --git a/plugins/CMakeLists.txt b/plugins/CMakeLists.txt index 1dfb388d..84ec7fc8 100644 --- a/plugins/CMakeLists.txt +++ b/plugins/CMakeLists.txt @@ -29,7 +29,7 @@ include(generate_product_version) set(VERSION_MAJOR 5) set(VERSION_MINOR 33) -set(VERSION_PATCH 7) +set(VERSION_PATCH 6) add_library(pch pch.cpp) target_precompile_headers(pch PUBLIC pch.h)