Add Host configuration to radio endpoint

master
DataHoarder 7 months ago
parent 1464004dc4
commit 07ac74ca46
Signed by: DataHoarder
SSH Key Fingerprint: SHA256:EnPQOqPpbCa7nzalCEJY2sd9iPluFIBuJu2rDFalACI

@ -28,7 +28,7 @@ func main() {
defer wg.Done()
server := http.Server{
Addr: fmt.Sprintf(":%d", config.Radio.Port),
Addr: fmt.Sprintf("%s:%d", config.Radio.Host, config.Radio.Port),
Handler: http.HandlerFunc(queue.HandleRadioRequest),
}
server.SetKeepAlivesEnabled(false)

@ -26,6 +26,7 @@ type Config struct {
BitDepth int `toml:"bitdepth"`
} `toml:"queue"`
Radio struct {
Host string `toml:"host"`
Port int `toml:"port"`
Name string `toml:"name"`
Description string `toml:"description"`

@ -71,8 +71,10 @@ replaygain=false
[radio]
#
# The port to stream actual audio on. MeteorLight will listen on localhost.
# The HTTP port to stream actual audio on.
port=8001
# The HTTP bind address to stream actual audio on.
host="127.0.0.1"
# Name of the stream.
name="my radio"
# Description of the stream.

Loading…
Cancel
Save