settings: add audio normalization checkbox

This commit is contained in:
pax 2026-04-11 23:22:28 -05:00
parent 738e1329b8
commit 73206994ec

View File

@ -205,6 +205,11 @@ class SettingsDialog(QDialog):
self._flip_layout.setChecked(self._db.get_setting_bool("flip_layout")) self._flip_layout.setChecked(self._db.get_setting_bool("flip_layout"))
form.addRow("", self._flip_layout) form.addRow("", self._flip_layout)
# Audio normalization
self._loudnorm = QCheckBox("Normalize audio volume (EBU R128)")
self._loudnorm.setChecked(self._db.get_setting_bool("loudnorm"))
form.addRow("", self._loudnorm)
# Slideshow monitor # Slideshow monitor
from PySide6.QtWidgets import QApplication from PySide6.QtWidgets import QApplication
self._monitor_combo = QComboBox() self._monitor_combo = QComboBox()
@ -811,6 +816,7 @@ class SettingsDialog(QDialog):
self._db.set_setting("unbookmark_on_save", "1" if self._unbookmark_on_save.isChecked() else "0") self._db.set_setting("unbookmark_on_save", "1" if self._unbookmark_on_save.isChecked() else "0")
self._db.set_setting("search_history_enabled", "1" if self._search_history.isChecked() else "0") self._db.set_setting("search_history_enabled", "1" if self._search_history.isChecked() else "0")
self._db.set_setting("flip_layout", "1" if self._flip_layout.isChecked() else "0") self._db.set_setting("flip_layout", "1" if self._flip_layout.isChecked() else "0")
self._db.set_setting("loudnorm", "1" if self._loudnorm.isChecked() else "0")
self._db.set_setting("slideshow_monitor", self._monitor_combo.currentText()) self._db.set_setting("slideshow_monitor", self._monitor_combo.currentText())
_anchor_rmap = {"Center": "center", "Top-left": "tl", "Top-right": "tr", "Bottom-left": "bl", "Bottom-right": "br"} _anchor_rmap = {"Center": "center", "Top-left": "tl", "Top-right": "tr", "Bottom-left": "bl", "Bottom-right": "br"}
self._db.set_setting("popout_anchor", _anchor_rmap.get(self._popout_anchor.currentText(), "center")) self._db.set_setting("popout_anchor", _anchor_rmap.get(self._popout_anchor.currentText(), "center"))