Remove custom paths and add constants (#216)

This commit is contained in:
Gabe Kangas
2020-10-03 14:35:03 -07:00
committed by GitHub
parent f30cfcf20f
commit 922dfec77a
12 changed files with 55 additions and 72 deletions

View File

@@ -15,15 +15,12 @@ var _default config
type config struct {
ChatDatabaseFilePath string `yaml:"chatDatabaseFile"`
DisableWebFeatures bool `yaml:"disableWebFeatures"`
EnableDebugFeatures bool `yaml:"-"`
FFMpegPath string `yaml:"ffmpegPath"`
Files files `yaml:"files"`
InstanceDetails InstanceDetails `yaml:"instanceDetails"`
PrivateHLSPath string `yaml:"privateHLSPath"`
PublicHLSPath string `yaml:"publicHLSPath"`
S3 S3 `yaml:"s3"`
VersionInfo string `yaml:"-"`
VersionInfo string `yaml:"-"` // For storing the version/build number
VideoSettings videoSettings `yaml:"videoSettings"`
WebServerPort int `yaml:"webServerPort"`
YP yp `yaml:"yp"`
@@ -158,22 +155,6 @@ func (c *config) GetVideoSegmentSecondsLength() int {
return _default.GetVideoSegmentSecondsLength()
}
func (c *config) GetPublicHLSSavePath() string {
if c.PublicHLSPath != "" {
return c.PublicHLSPath
}
return _default.PublicHLSPath
}
func (c *config) GetPrivateHLSSavePath() string {
if c.PrivateHLSPath != "" {
return c.PrivateHLSPath
}
return _default.PrivateHLSPath
}
func (c *config) GetPublicWebServerPort() int {
if c.WebServerPort != 0 {
return c.WebServerPort