From b68e51976dd7d7ec3cbcb4ed7accd52658ff3b3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Thu, 1 Aug 2024 13:47:52 +0200 Subject: [PATCH] Manager: actually respect `autodiscoverable: false` in configuration The Manager configuration has an option to disable the UPnP/SSDP server, and now it actually listens to it. --- cmd/flamenco-manager/main.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cmd/flamenco-manager/main.go b/cmd/flamenco-manager/main.go index 1741e25e..f9cd12a5 100644 --- a/cmd/flamenco-manager/main.go +++ b/cmd/flamenco-manager/main.go @@ -148,7 +148,13 @@ func runFlamencoManager() bool { log.Fatal().Err(err).Msg("unable to figure out my own URL") } - ssdp := makeAutoDiscoverable(urls) + // Construct the UPnP/SSDP server. + var ssdp *upnp_ssdp.Server + if configService.Get().SSDPDiscovery { + ssdp = makeAutoDiscoverable(urls) + } else { + log.Debug().Msg("UPnP/SSDP autodiscovery disabled in configuration") + } // Construct the services. persist := openDB(*configService)