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
No related branches found
No related tags found
No related merge requests found
...@@ -25,7 +25,7 @@ set("log.stdout", true) ...@@ -25,7 +25,7 @@ set("log.stdout", true)
upstream = mksafe(input.http("{{.SourceURL}}", buffer=5.0)) 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}}), 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) upstream)
` `
...@@ -41,6 +41,7 @@ type liquidsoapParams struct { ...@@ -41,6 +41,7 @@ type liquidsoapParams struct {
TargetIP string TargetIP string
TargetPort int TargetPort int
TargetMount string TargetMount string
TargetUsername string
TargetPassword string TargetPassword string
// Stream encoding parameters. One note on the 'float32' // Stream encoding parameters. One note on the 'float32'
...@@ -62,6 +63,7 @@ func newLiquidsoapParams(mount *autoradio.Mount) *liquidsoapParams { ...@@ -62,6 +63,7 @@ func newLiquidsoapParams(mount *autoradio.Mount) *liquidsoapParams {
TargetIP: "localhost", TargetIP: "localhost",
TargetPort: 80, TargetPort: 80,
TargetMount: mount.Name, TargetMount: mount.Name,
TargetUsername: mount.Username,
TargetPassword: mount.Password, TargetPassword: mount.Password,
Format: mount.Transcoding.Format, Format: mount.Transcoding.Format,
BitRate: mount.Transcoding.BitRate, BitRate: mount.Transcoding.BitRate,
......
...@@ -16,6 +16,7 @@ var testParams = &liquidsoapParams{ ...@@ -16,6 +16,7 @@ var testParams = &liquidsoapParams{
TargetIP: "localhost", TargetIP: "localhost",
TargetPort: 80, TargetPort: 80,
TargetMount: "/stream.mp3", TargetMount: "/stream.mp3",
TargetUsername: "sourceuser",
TargetPassword: "password", TargetPassword: "password",
Format: "mp3", Format: "mp3",
BitRate: 64, BitRate: 64,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment