Commit 9f4d8421 authored by ale's avatar ale

Disable autogeneration of silence.ogg fallback mount

parent 08e05ac3
Pipeline #6956 passed with stages
in 2 minutes and 13 seconds
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment