feat: tune cmhub image timeouts
This commit is contained in:
@@ -88,7 +88,7 @@ class SettingsTab(QWidget):
|
||||
self.cmhub_connect_timeout_spin = QSpinBox()
|
||||
self.cmhub_connect_timeout_spin.setObjectName("cmhubConnectTimeoutSpin")
|
||||
self.cmhub_connect_timeout_spin.setRange(1, 3600)
|
||||
self.cmhub_connect_timeout_spin.setValue(10)
|
||||
self.cmhub_connect_timeout_spin.setValue(appconfig.CMHUB_CONNECT_TIMEOUT_DEFAULT)
|
||||
self.cmhub_check_balance_checkbox = QCheckBox("批量生成前检查余额")
|
||||
self.cmhub_check_balance_checkbox.setObjectName("cmhubCheckBalanceCheckbox")
|
||||
self.cmhub_refresh_button = QPushButton("刷新别名")
|
||||
@@ -825,7 +825,16 @@ class SettingsTab(QWidget):
|
||||
self._loaded_cmhub_api_key = appconfig.get_cmhub_api_key(path=self.cmhub_config_path)
|
||||
self.cmhub_api_key_edit.setText(self._loaded_cmhub_api_key)
|
||||
self.cmhub_connect_timeout_spin.setValue(
|
||||
max(1, int(cmhub_cfg.get("connect_timeout", 10) or 10))
|
||||
max(
|
||||
1,
|
||||
int(
|
||||
cmhub_cfg.get(
|
||||
"connect_timeout",
|
||||
appconfig.CMHUB_CONNECT_TIMEOUT_DEFAULT,
|
||||
)
|
||||
or appconfig.CMHUB_CONNECT_TIMEOUT_DEFAULT
|
||||
),
|
||||
)
|
||||
)
|
||||
self.cmhub_check_balance_checkbox.setChecked(
|
||||
bool(cmhub_cfg.get("check_balance_before_batch", False))
|
||||
|
||||
Reference in New Issue
Block a user