summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2016-12-29 21:27:30 (GMT)
committerChristian Pointner <equinox@helsinki.at>2016-12-29 21:27:30 (GMT)
commit2214280f98682c8a7c9dc3677d12c3d8a811f8b4 (patch)
tree26e2e263dfceaf6bdf03dc54bd1bfb04201d5142
parent24627d13e7989a93e0e54b7644261ebf552fef03 (diff)
make snd directory configurable
-rw-r--r--src/rhlibrary/main.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/rhlibrary/main.go b/src/rhlibrary/main.go
index 1285dd3..94a5a06 100644
--- a/src/rhlibrary/main.go
+++ b/src/rhlibrary/main.go
@@ -76,6 +76,8 @@ func (s *envStringValue) String() string { return fmt.Sprintf("%s", *s) }
func main() {
rdconf := newEnvStringValue("RHLIBRARY_RD_CONF", "/etc/rd.conf")
flag.Var(rdconf, "rdconf", "path to the Rivendell config file (environment: RHLIBRARY_RD_CONF)")
+ sndDir := newEnvStringValue("RHLIBRARY_SND_DIR", "/var/snd")
+ flag.Var(sndDir, "snddir", "path to the Rivendell snd directory (environment: RHLIBRARY_SND_DIR)")
help := flag.Bool("help", false, "show usage")
flag.Parse()
@@ -93,7 +95,7 @@ func main() {
}
defer db.Cleanup()
- p, err := player.NewPlayer("/var/snd", rhl, rhdl)
+ p, err := player.NewPlayer(sndDir.Get().(string), rhl, rhdl)
if err != nil {
rhl.Println("Error initializing Player:", err)
return