A bunch of changes

This commit is contained in:
Ignacio Serantes
2026-03-23 22:50:02 +01:00
parent 547bfbf760
commit 291f2f9e47
8 changed files with 401 additions and 250 deletions

View File

@@ -35,7 +35,7 @@ from constants import (
THUMBNAILS_TOOLTIP_FG_COLOR_DEFAULT, THUMBNAILS_FILENAME_FONT_SIZE_DEFAULT,
THUMBNAILS_TAGS_LINES_DEFAULT, THUMBNAILS_TAGS_FONT_SIZE_DEFAULT,
VIEWER_AUTO_RESIZE_WINDOW_DEFAULT, VIEWER_WHEEL_SPEED_DEFAULT,
UITexts, save_app_config,
UITexts, save_app_config, HAVE_BAGHEERASEARCH_LIB
)
@@ -741,9 +741,24 @@ class SettingsDialog(QDialog):
self.threads_spin.setValue(scan_threads)
# Set search engine
index = self.search_engine_combo.findData(search_engine)
if index != -1:
self.search_engine_combo.setCurrentIndex(index)
if HAVE_BAGHEERASEARCH_LIB:
self.search_engine_combo.setEnabled(True)
if search_engine != "Baloo":
index = self.search_engine_combo.findData("Bagheera")
if index != -1:
self.search_engine_combo.setCurrentIndex(index)
else:
index = self.search_engine_combo.findData("Baloo")
if index != -1:
self.search_engine_combo.setCurrentIndex(index)
else:
self.search_engine_combo.setEnabled(False)
if SEARCH_CMD:
index = self.search_engine_combo.findData("Baloo")
if index != -1:
self.search_engine_combo.setCurrentIndex(index)
else:
self.search_engine_combo.setCurrentIndex(-1)
self.scan_full_on_start_checkbox.setChecked(scan_full_on_start)
@@ -1009,7 +1024,8 @@ class SettingsDialog(QDialog):
APP_CONFIG["scan_max_level"] = self.scan_max_level_spin.value()
APP_CONFIG["generation_threads"] = self.threads_spin.value()
APP_CONFIG["scan_batch_size"] = self.scan_batch_size_spin.value()
APP_CONFIG["search_engine"] = self.search_engine_combo.currentData()
if HAVE_BAGHEERASEARCH_LIB:
APP_CONFIG["search_engine"] = self.search_engine_combo.currentData()
APP_CONFIG["scan_full_on_start"] = self.scan_full_on_start_checkbox.isChecked()
APP_CONFIG["person_tags"] = self.person_tags_edit.text()
APP_CONFIG["pet_tags"] = self.pet_tags_edit.text()