summaryrefslogtreecommitdiffstats
path: root/ui/main_window.py
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-05-05 10:51:56 +0200
committerDanilo M. <danix@danix.xyz>2026-05-05 10:51:56 +0200
commit54ad3e37c6e9d2242f932c192119dd6de64966cf (patch)
tree84c7018152825a63c2f6b009f18634a8585d996a /ui/main_window.py
parent48b84da95d0736124f8be6849aa32df31bdb29aa (diff)
downloadpublisher-54ad3e37c6e9d2242f932c192119dd6de64966cf.tar.gz
publisher-54ad3e37c6e9d2242f932c192119dd6de64966cf.zip
feat: check OLLAMA_HOST reachability before starting translationv1.6
Non-blocking QThread check hits /api/tags on the resolved ollama host before launching TranslationWorker. Shows QMessageBox.warning() if unreachable; proceeds silently if reachable. Adds ollama_host field to Config with env-var fallback to http://localhost:11434. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'ui/main_window.py')
-rw-r--r--ui/main_window.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/ui/main_window.py b/ui/main_window.py
index 8aa2762..83a2eed 100644
--- a/ui/main_window.py
+++ b/ui/main_window.py
@@ -105,6 +105,7 @@ class MainWindow(QMainWindow):
self.config.transart_script,
self.config.typora_bin,
self.config.typora_args,
+ ollama_host=self.config.ollama_host,
parent=self,
)
self._translation_view.push_master.connect(lambda: self._do_git_push("master"))