This commit is contained in:
Your Name
2026-04-22 14:13:21 +08:00
parent e0406b5d0e
commit 7cbde2aa78
145 changed files with 23086 additions and 2243 deletions

View File

@@ -1355,7 +1355,7 @@ class SystemSettingsWidget(QWidget):
return
raw_value = self.thread_count_input.text().strip()
try:
thread_count = str(min(20, max(1, int(raw_value or '10'))))
thread_count = str(max(1, int(raw_value or '10')))
except Exception:
thread_count = '10'
if self.thread_count_input.text().strip() != thread_count:
@@ -1390,7 +1390,7 @@ class SystemSettingsWidget(QWidget):
if os.path.exists('thread_count.json'):
with open('thread_count.json', 'r', encoding='utf-8') as f:
thread_config = json.load(f)
thread_count = str(min(20, max(1, int(thread_config.get('thread_count', '10') or '10'))))
thread_count = str(max(1, int(thread_config.get('thread_count', '10') or '10')))
self.thread_count_input.setText(thread_count)
logger.info("检测线程数配置加载成功")
else: