new settings disable ir
This commit is contained in:
parent
619de20cd6
commit
fe4bf577bd
@ -110,6 +110,8 @@ class MainWindowNew(QMainWindow):
|
||||
|
||||
# ИК-пульт
|
||||
self._ir_enabled = self._settings.value("ir_remote/enabled", False)
|
||||
if isinstance(self._ir_enabled, str):
|
||||
self._ir_enabled = self._ir_enabled.lower() in ("true", "1", "yes")
|
||||
if self._ir_enabled:
|
||||
self._ir_service = IrRemoteService(self)
|
||||
self._connect_ir_remote()
|
||||
@ -158,7 +160,8 @@ class MainWindowNew(QMainWindow):
|
||||
self.lbl_bt.setText(self.media_screen.source.text())
|
||||
|
||||
# Запускаем ИК-пульт
|
||||
self._ir_service.start()
|
||||
if self._ir_enabled:
|
||||
self._ir_service.start()
|
||||
|
||||
def _connect_ir_remote(self):
|
||||
"""Подключить сигналы ИК-пульта."""
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user