chore: modify disable auto update & config

This commit is contained in:
Sadegh Barzegar
2025-04-05 05:01:46 +03:30
parent 5604f5073d
commit 0a779063bf
2 changed files with 10 additions and 7 deletions

View File

@@ -66,8 +66,8 @@ class AutoUpdateDisabler:
}
self.product_json_path = self.product_json_paths.get(self.system)
def _change_main_js(self):
"""Change main.js"""
def _remove_update_url(self):
"""Remove update URL"""
try:
original_stat = os.stat(self.product_json_path)
original_mode = original_stat.st_mode
@@ -232,8 +232,8 @@ class AutoUpdateDisabler:
if not self._create_blocking_file():
return False
# 5. Change main.js
if not self._change_main_js():
# 5. Remove update URL from product.json
if not self._remove_update_url():
return False
print(f"{Fore.GREEN}{EMOJI['CHECK']} {self.translator.get('update.disable_success') if self.translator else '自动更新已禁用'}{Style.RESET_ALL}")