Config entry `zeroconf_port` not working
Description
The value of the entry zeroconf_port on a config file is not working.
Using the command line parameter --zeroconf-port the option works.
To Reproduce
- Create a config file with zeroconf entry like
zeroconf_port = 4444 - Run spotifyd specifying this config file and the flag
--verbose - Search the log for Zeroconf server listening on and see that its using another random port
- Confirm on shell listing used ports, like on
# sudo lsof -i -P -n | grep spotify
Expected behavior
Spotifyd listening on the port specified on entry zeroconf_port.
Logs
Click to show logs
spotifyd --no-daemon --config-path /home/spotify/spotifyd.conf --verbose Loading config from "/home/spotify/spotifyd.conf" CliConfig { config_path: Some("/home/spotify/spotifyd.conf"), no_daemon: true, verbose: true, pid: None, shared_config: SharedConfigValues { username: Some("taken out for privacy"), password: Some("taken out for privacy"), password_cmd: None, use_keyring: false, on_song_change_hook: None, cache_path: Some("/var/cache/spotifyd"), no-audio-cache: false, backend: None, volume_controller: None, device: None, control: None, mixer: None, device_name: Some("mydevice"), bitrate: Some(Bitrate320), volume_normalisation: true, normalisation_pregain: None, zeroconf_port: None, proxy: None } } Found shell "/bin/false" using SHELL environment variable. No proxy specified registering with poller registering with poller registering with poller registering with poller build; num-workers=4 registering with poller Using software volume controller. starting background reactor adding I/O source: 0 registering with poller Zeroconf server listening on 0.0.0.0:46211 adding I/O source: 4194305Versions (please complete the following information):
- OS: Ubuntu 18.04 LTS 64bits
- Spotifyd: relase v0.2.23 linux-full (confirmed fail also in v0.2.20 and v0.2.15)
Command line
Calling spotifyd using the command line parameter --zeroconf-port 4444 works well. The verbose logs will show the CliConfig value as { ... zeroconf_port: Some(4444), ...} and the Zeroconf log using the specified 4444 port.
Just took a look and it seems that I didn't forget to pass it down or configured the config entries wrong. Need to investigate this closer.