mirror of
https://github.com/hyb-oyqq/FRAISEMOE-Addons-Installer-NEXT.git
synced 2025-12-20 13:58:37 +00:00
feat(core): 增强离线模式支持和版本管理
- 在主窗口中添加离线模式管理器,支持自动切换到离线模式。 - 更新下载管理器以处理离线模式下的下载逻辑,确保用户体验流畅。 - 添加版本警告机制,提示用户在版本过低时的操作选项。 - 优化配置管理器,确保在离线模式下仍可使用相关功能。 - 更新UI管理器以反映当前工作模式,提升用户界面友好性。
This commit is contained in:
@@ -200,7 +200,15 @@ class DownloadThread(QThread):
|
||||
|
||||
command.append(self.url)
|
||||
|
||||
print(f"即将执行的 Aria2c 命令: {' '.join(command)}")
|
||||
# 创建一个安全的命令副本,隐藏URL
|
||||
safe_command = command.copy()
|
||||
if len(safe_command) > 0:
|
||||
# 替换最后一个参数(URL)为安全版本
|
||||
url = safe_command[-1]
|
||||
if isinstance(url, str) and url.startswith("http"):
|
||||
safe_command[-1] = "***URL protection***"
|
||||
|
||||
print(f"即将执行的 Aria2c 命令: {' '.join(safe_command)}")
|
||||
|
||||
creation_flags = subprocess.CREATE_NO_WINDOW if sys.platform == 'win32' else 0
|
||||
self.process = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, text=True, encoding='utf-8', errors='replace', creationflags=creation_flags)
|
||||
@@ -220,8 +228,11 @@ class DownloadThread(QThread):
|
||||
else:
|
||||
break
|
||||
|
||||
full_output.append(line)
|
||||
print(line.strip())
|
||||
# 处理输出行,隐藏可能包含的URL
|
||||
from utils.helpers import censor_url
|
||||
censored_line = censor_url(line)
|
||||
full_output.append(censored_line)
|
||||
print(censored_line.strip())
|
||||
|
||||
match = progress_pattern.search(line)
|
||||
if match:
|
||||
|
||||
Reference in New Issue
Block a user