Skip to content
Snippets Groups Projects
Commit 32ca75ff authored by ale's avatar ale
Browse files

include source username in the liquidsoap configuration

parent fadb997b
Branches
No related tags found
No related merge requests found
......@@ -25,7 +25,7 @@ set("log.stdout", true)
upstream = mksafe(input.http("{{.SourceURL}}", buffer=5.0))
output.icecast(%{{.Format}}(samplerate={{.SampleRate}}, {{if gt .BitRate 0}}bitrate={{.BitRate}}, {{end}}{{if gt .Quality 0.0}}quality={{.Quality}}, {{end}}{{if eq .Channels 2}}stereo{{else}}mono{{end}}),
mount="{{.TargetMount}}", host="{{.TargetIP}}", port={{.TargetPort}}, password="{{.TargetPassword}}",
mount="{{.TargetMount}}", host="{{.TargetIP}}", port={{.TargetPort}}, user="{{.TargetUsername}}", password="{{.TargetPassword}}",
upstream)
`
......@@ -41,6 +41,7 @@ type liquidsoapParams struct {
TargetIP string
TargetPort int
TargetMount string
TargetUsername string
TargetPassword string
// Stream encoding parameters. One note on the 'float32'
......@@ -62,6 +63,7 @@ func newLiquidsoapParams(mount *autoradio.Mount) *liquidsoapParams {
TargetIP: "localhost",
TargetPort: 80,
TargetMount: mount.Name,
TargetUsername: mount.Username,
TargetPassword: mount.Password,
Format: mount.Transcoding.Format,
BitRate: mount.Transcoding.BitRate,
......
......@@ -16,6 +16,7 @@ var testParams = &liquidsoapParams{
TargetIP: "localhost",
TargetPort: 80,
TargetMount: "/stream.mp3",
TargetUsername: "sourceuser",
TargetPassword: "password",
Format: "mp3",
BitRate: 64,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment