fix: align cmhub image timeout display
This commit is contained in:
@@ -4,6 +4,7 @@ from __future__ import annotations
|
||||
|
||||
from contextlib import contextmanager
|
||||
|
||||
from ... import ai as ai_module
|
||||
from ..widgets import *
|
||||
from ..workers import AIModelTestWorker as _RealAIModelTestWorker
|
||||
from ..workers import CMHubSettingsWorker as _RealCMHubSettingsWorker
|
||||
@@ -922,6 +923,15 @@ class SettingsTab(QWidget):
|
||||
|
||||
def _update_response_timeout_label(self, index=None):
|
||||
ai_cfg = appconfig.ai_config(self.config)
|
||||
if appconfig.ai_backend(self.config) == "cmhub":
|
||||
self.response_timeout_label.setText(
|
||||
"标题 %s 秒 / 图片 %s 秒"
|
||||
% (
|
||||
ai_module.CMHUB_TITLE_READ_TIMEOUT_SECONDS,
|
||||
ai_module.CMHUB_IMAGE_READ_TIMEOUT_SECONDS,
|
||||
)
|
||||
)
|
||||
return
|
||||
resolution = self.resolution_combo.currentData() or ai_cfg.get("resolution", "1k")
|
||||
timeouts = ai_cfg.get("resolution_timeouts", {})
|
||||
timeout = timeouts.get(str(resolution))
|
||||
|
||||
Reference in New Issue
Block a user