Add Host configuration to radio endpoint
This commit is contained in:
parent
1464004dc4
commit
07ac74ca46
|
@ -28,7 +28,7 @@ func main() {
|
||||||
defer wg.Done()
|
defer wg.Done()
|
||||||
|
|
||||||
server := http.Server{
|
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),
|
Handler: http.HandlerFunc(queue.HandleRadioRequest),
|
||||||
}
|
}
|
||||||
server.SetKeepAlivesEnabled(false)
|
server.SetKeepAlivesEnabled(false)
|
||||||
|
|
|
@ -26,6 +26,7 @@ type Config struct {
|
||||||
BitDepth int `toml:"bitdepth"`
|
BitDepth int `toml:"bitdepth"`
|
||||||
} `toml:"queue"`
|
} `toml:"queue"`
|
||||||
Radio struct {
|
Radio struct {
|
||||||
|
Host string `toml:"host"`
|
||||||
Port int `toml:"port"`
|
Port int `toml:"port"`
|
||||||
Name string `toml:"name"`
|
Name string `toml:"name"`
|
||||||
Description string `toml:"description"`
|
Description string `toml:"description"`
|
||||||
|
|
|
@ -71,8 +71,10 @@ replaygain=false
|
||||||
|
|
||||||
[radio]
|
[radio]
|
||||||
#
|
#
|
||||||
# The port to stream actual audio on. MeteorLight will listen on localhost.
|
# The HTTP port to stream actual audio on.
|
||||||
port=8001
|
port=8001
|
||||||
|
# The HTTP bind address to stream actual audio on.
|
||||||
|
host="127.0.0.1"
|
||||||
# Name of the stream.
|
# Name of the stream.
|
||||||
name="my radio"
|
name="my radio"
|
||||||
# Description of the stream.
|
# Description of the stream.
|
||||||
|
|
Loading…
Reference in New Issue