Make setting the max # of segments in playlist optional

This commit is contained in:
Gabe Kangas
2020-07-13 14:55:21 -07:00
parent 9b104f1d40
commit 0027957a33
3 changed files with 9 additions and 4 deletions

View File

@@ -189,6 +189,14 @@ func (c *config) GetPublicWebServerPort() int {
return 8080
}
func (c *config) GetMaxNumberOfReferencedSegmentsInPlaylist() int {
if c.Files.MaxNumberInPlaylist > 0 {
return c.Files.MaxNumberInPlaylist
}
return 20
}
//Load tries to load the configuration file
func Load(filePath string, versionInfo string) error {
Config = new(config)