Skip to content
Snippets Groups Projects
Commit 9f4d8421 authored by ale's avatar ale
Browse files

Disable autogeneration of silence.ogg fallback mount

parent 08e05ac3
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment