1
0
Fork 0
mirror of synced 2024-06-02 18:54:41 +12:00

Disable pypresence settings if not installed

This commit is contained in:
lennard 2022-09-27 21:55:57 +02:00
parent fbd16b99ae
commit ebd567e665
No known key found for this signature in database
GPG key ID: AB6010FE63C7C2B1

View file

@ -31,6 +31,12 @@ class RPCSettings(QGroupBox, Ui_RPCSettings):
lambda: self.settings.setValue("rpc_time", self.show_time.isChecked())
)
try:
import pypresence
except ModuleNotFoundError:
self.setDisabled(True)
self.setToolTip(self.tr("Pypresence is not installed"))
def changed(self, i):
self.settings.setValue("rpc_enable", i)
self.signals.rpc_settings_updated.emit()