diff --git a/node/icecast/config.go b/node/icecast/config.go index 432ca477079ed7efaa1e80ec7e960be9d5f6c9c6..0786c5f42e05b776c05a0d10deeae02f87f2830e 100644 --- a/node/icecast/config.go +++ b/node/icecast/config.go @@ -9,7 +9,6 @@ import ( "net" "net/url" "os" - "path/filepath" "git.autistici.org/ale/autoradio" pb "git.autistici.org/ale/autoradio/proto" @@ -263,25 +262,17 @@ func slaveMountConfig(m *pb.Mount, masterAddr string) (*iceRelayConfig, error) { func masterMountConfig(m *pb.Mount) *iceMountConfig { mc := iceMountConfig{ - Name: autoradio.MountPathToIcecastPath(m.Path), - Username: m.SourceUsername, - Password: m.SourcePassword, - FallbackOverride: 1, + Name: autoradio.MountPathToIcecastPath(m.Path), + Username: m.SourceUsername, + Password: m.SourcePassword, // MaxListeners: 1000, // NoYp: 1, } - // When no explicit fallback URL is specified, use the locally - // installed silence audo file. In order to serve the right - // format, we guess the file extension for the silence - // fallback by looking at the extension of the mount itself. - switch { - case m.FallbackPath != "": + // Set the explicit fallback URL if present. + if m.FallbackPath != "" { mc.FallbackMount = m.FallbackPath - case filepath.Ext(m.Path) == ".ogg": - mc.FallbackMount = "/silence.ogg" - default: - mc.FallbackMount = "/silence.mp3" + mc.FallbackOverride = 1 } return &mc