d
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user