From 8dceed38b613c256a354ab839484e55acbe8b05f Mon Sep 17 00:00:00 2001 From: Lucas Bickel <116588+hairmare@users.noreply.github.com> Date: Mon, 11 Dec 2023 19:44:16 +0100 Subject: [PATCH] fix(smc-output): working enable/disable option (#560) it's not ready yet because we need to open the firewall first anyways. --- nowplaying/daemon.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/nowplaying/daemon.py b/nowplaying/daemon.py index d7b3b38f..2f17333c 100644 --- a/nowplaying/daemon.py +++ b/nowplaying/daemon.py @@ -137,15 +137,16 @@ def get_track_handler(self): # pragma: no cover ) ) ) - handler.register_observer( - SmcFtpTrackObserver( - options=SmcFtpTrackObserver.Options( - hostname=self.options.dab_smc_ftp_hostname, - username=self.options.dab_smc_ftp_username, - password=self.options.dab_smc_ftp_password, + if self.options.dab_smc: + handler.register_observer( + SmcFtpTrackObserver( + options=SmcFtpTrackObserver.Options( + hostname=self.options.dab_smc_ftp_hostname, + username=self.options.dab_smc_ftp_username, + password=self.options.dab_smc_ftp_password, + ) ) ) - ) return handler