Make setting save location paths optional

This commit is contained in:
Gabe Kangas
2020-07-13 14:45:54 -07:00
parent d51901e191
commit 44806d1a8e
6 changed files with 34 additions and 22 deletions

View File

@@ -164,6 +164,22 @@ func (c *config) GetVideoSegmentSecondsLength() int {
return 4
}
func (c *config) GetPublicHLSSavePath() string {
if c.PublicHLSPath != "" {
return c.PublicHLSPath
}
return "webroot/hls"
}
func (c *config) GetPrivateHLSSavePath() string {
if c.PrivateHLSPath != "" {
return c.PrivateHLSPath
}
return "hls"
}
//Load tries to load the configuration file
func Load(filePath string, versionInfo string) error {
Config = new(config)