stream file fix
This commit is contained in:
@@ -9,10 +9,7 @@ type ZurgConfig struct {
|
||||
CacheTimeHours int `yaml:"info_cache_time_hours"`
|
||||
CanRepair bool `yaml:"enable_repair"`
|
||||
OnLibraryUpdate string `yaml:"on_library_update"`
|
||||
}
|
||||
|
||||
func (z *ZurgConfig) GetVersion() string {
|
||||
return "v1"
|
||||
NetworkBufferSize int `yaml:"network_buffer_size"`
|
||||
}
|
||||
|
||||
func (z *ZurgConfig) GetToken() string {
|
||||
@@ -20,14 +17,23 @@ func (z *ZurgConfig) GetToken() string {
|
||||
}
|
||||
|
||||
func (z *ZurgConfig) GetPort() string {
|
||||
if z.Port == "" {
|
||||
return "9999"
|
||||
}
|
||||
return z.Port
|
||||
}
|
||||
|
||||
func (z *ZurgConfig) GetNumOfWorkers() int {
|
||||
if z.NumOfWorkers == 0 {
|
||||
return 10
|
||||
}
|
||||
return z.NumOfWorkers
|
||||
}
|
||||
|
||||
func (z *ZurgConfig) GetRefreshEverySeconds() int {
|
||||
if z.RefreshEverySeconds == 0 {
|
||||
return 60
|
||||
}
|
||||
return z.RefreshEverySeconds
|
||||
}
|
||||
|
||||
@@ -42,3 +48,10 @@ func (z *ZurgConfig) EnableRepair() bool {
|
||||
func (z *ZurgConfig) GetOnLibraryUpdate() string {
|
||||
return z.OnLibraryUpdate
|
||||
}
|
||||
|
||||
func (z *ZurgConfig) GetNetworkBufferSize() int {
|
||||
if z.NetworkBufferSize == 0 {
|
||||
return 32 * 1024
|
||||
}
|
||||
return z.NetworkBufferSize
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user