diff --git a/config/template.json b/config/template.json index 4a564ea5b..293e27dec 100644 --- a/config/template.json +++ b/config/template.json @@ -236,7 +236,6 @@ "HookGeneral": { "Enable": false, "RestartEverytime": true, - "PushEveryTime": true, "Architecture": "auto", "InjectMethod": "local_patch", "RequestTimeLimit": 10, diff --git a/module/config/argument/args.json b/module/config/argument/args.json index 436bcd54a..3b6b30407 100644 --- a/module/config/argument/args.json +++ b/module/config/argument/args.json @@ -935,10 +935,6 @@ "type": "checkbox", "value": true }, - "PushEveryTime": { - "type": "checkbox", - "value": true - }, "Architecture": { "type": "select", "value": "auto", diff --git a/module/config/argument/argument.yaml b/module/config/argument/argument.yaml index ca6b82b15..c0066f100 100644 --- a/module/config/argument/argument.yaml +++ b/module/config/argument/argument.yaml @@ -153,7 +153,6 @@ OldRetire: HookGeneral: Enable: false RestartEverytime: true - PushEveryTime: true Architecture: value: auto option: [ auto, x86, x86_64, arm64-v8a, armeabi-v7a ] diff --git a/module/config/config_generated.py b/module/config/config_generated.py index 4be9856ac..faaea9e41 100644 --- a/module/config/config_generated.py +++ b/module/config/config_generated.py @@ -81,7 +81,6 @@ class GeneratedConfig: # Group `HookGeneral` HookGeneral_Enable = False HookGeneral_RestartEverytime = True - HookGeneral_PushEveryTime = True HookGeneral_Architecture = 'auto' # auto, x86, x86_64, arm64-v8a, armeabi-v7a HookGeneral_InjectMethod = 'local_patch' # local_patch, global_patch, outer_inject HookGeneral_RequestTimeLimit = 10 diff --git a/module/config/i18n/en-US.json b/module/config/i18n/en-US.json index 52d9e404d..0a3da28cb 100644 --- a/module/config/i18n/en-US.json +++ b/module/config/i18n/en-US.json @@ -777,10 +777,6 @@ "name": "HookGeneral.RestartEverytime.name", "help": "HookGeneral.RestartEverytime.help" }, - "PushEveryTime": { - "name": "HookGeneral.PushEveryTime.name", - "help": "HookGeneral.PushEveryTime.help" - }, "Architecture": { "name": "HookGeneral.Architecture.name", "help": "HookGeneral.Architecture.help", diff --git a/module/config/i18n/ja-JP.json b/module/config/i18n/ja-JP.json index 37c5d991a..2eeec24fd 100644 --- a/module/config/i18n/ja-JP.json +++ b/module/config/i18n/ja-JP.json @@ -777,10 +777,6 @@ "name": "HookGeneral.RestartEverytime.name", "help": "HookGeneral.RestartEverytime.help" }, - "PushEveryTime": { - "name": "HookGeneral.PushEveryTime.name", - "help": "HookGeneral.PushEveryTime.help" - }, "Architecture": { "name": "HookGeneral.Architecture.name", "help": "HookGeneral.Architecture.help", diff --git a/module/config/i18n/zh-CN.json b/module/config/i18n/zh-CN.json index 5aa861154..45e28c1de 100644 --- a/module/config/i18n/zh-CN.json +++ b/module/config/i18n/zh-CN.json @@ -777,10 +777,6 @@ "name": "每次启动Alas时重启", "help": "推荐打开" }, - "PushEveryTime": { - "name": "每次重新推送资源", - "help": "视情况开关,建议开启" - }, "Architecture": { "name": "架构", "help": "选择使用的架构,如果自动检测失败,请手动选择\n游戏库目录中看到的架构和选项的对应关系一般如下:\nx86 -> x86\nx86_64 -> x86_64\narm -> armeabi-v7a\narm64 -> arm64-v8a", diff --git a/module/config/i18n/zh-TW.json b/module/config/i18n/zh-TW.json index bc28fb586..48a7db5cd 100644 --- a/module/config/i18n/zh-TW.json +++ b/module/config/i18n/zh-TW.json @@ -777,10 +777,6 @@ "name": "HookGeneral.RestartEverytime.name", "help": "HookGeneral.RestartEverytime.help" }, - "PushEveryTime": { - "name": "HookGeneral.PushEveryTime.name", - "help": "HookGeneral.PushEveryTime.help" - }, "Architecture": { "name": "HookGeneral.Architecture.name", "help": "HookGeneral.Architecture.help", diff --git a/module/luahook/crack.py b/module/luahook/crack.py index e93ffbed5..d991b2eb7 100644 --- a/module/luahook/crack.py +++ b/module/luahook/crack.py @@ -467,14 +467,13 @@ class CrackResource: if deep_get(self.config.data, "Hook.HookGeneral.RestartEverytime", True): self.device.app_stop() self.config.task_call("Restart") - else: - logger.info("Hook: do not restart everytime, skip to check resource and inject") - return self.__adb_root() self.__ensure_crack_resource() if not self.first_init: self.__check_update() - if self.has_new_version or not self.__is_remote_file_exist() or deep_get(self.config.data, "Hook.HookGeneral.PushEveryTime", True): + if self.has_new_version or not self.__is_remote_file_exist(): self.__push_resource() + self.device.app_stop() + self.config.task_call("Restart") self.__do_inject()