From 712801259e024ea957d786daa6e24f94c7f79f0e Mon Sep 17 00:00:00 2001 From: chrizg <22716298+chrizg@users.noreply.github.com> Date: Sun, 17 May 2026 01:02:45 +0200 Subject: [PATCH] feat(soundtouch-web): rename --host to --devices, support multiple devices via StringSliceFlag --- cmd/soundtouch-web/main.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/cmd/soundtouch-web/main.go b/cmd/soundtouch-web/main.go index e40f618..819f999 100644 --- a/cmd/soundtouch-web/main.go +++ b/cmd/soundtouch-web/main.go @@ -46,10 +46,10 @@ func main() { Usage: "Network interface name (e.g. eth0) for mDNS and UPnP device discovery. Defaults to the --bind interface name when one was given; leave empty otherwise to auto-pick", EnvVars: []string{"DISCOVERY_INTERFACE"}, }, - &cli.StringFlag{ - Name: "host", - Usage: "SoundTouch device IP address to add manually", - EnvVars: []string{"SOUNDTOUCH_HOST"}, + &cli.StringSliceFlag{ + Name: "devices", + Usage: "SoundTouch device IP address(es) to add manually (can be specified multiple times)", + EnvVars: []string{"SOUNDTOUCH_DEVICES"}, }, }, Action: func(c *cli.Context) error { @@ -66,7 +66,7 @@ func main() { } rawIface := c.String("interface") - manualHost := c.String("host") + manualHosts := c.StringSlice("devices") ifaceName := defaultDiscoveryInterface(rawIface, rawBind, bindAddr) if rawIface == "" && ifaceName != "" { @@ -105,8 +105,8 @@ func main() { webApp.BroadcastDiscoveryStatus("starting", len(webApp.Devices)) - if manualHost != "" { - addManualDevice(webApp, manualHost, 8090) + for _, host := range manualHosts { + addManualDevice(webApp, host, 8090) } discoverDevices(ctx, webApp, discoveryService)