Remove cache time limit for info

This commit is contained in:
Ben Sarmiento
2023-11-21 10:57:33 +01:00
parent 6ae18fba36
commit 3901230943
2 changed files with 17 additions and 23 deletions

View File

@@ -2,6 +2,23 @@ package config
import "math/rand"
type ConfigInterface interface {
GetVersion() string
GetToken() string
GetNumOfWorkers() int
GetRefreshEverySeconds() int
EnableRepair() bool
GetHost() string
GetPort() string
GetDirectories() []string
MeetsConditions(directory, torrentName string, torrentIDs, fileNames []string) bool
GetOnLibraryUpdate() string
GetNetworkBufferSize() int
GetMountPoint() string
EnableRetainFolderNameExtension() bool
GetRandomPreferredHost() string
}
type ZurgConfig struct {
Version string `yaml:"zurg"`
Token string `yaml:"token"`
@@ -9,7 +26,6 @@ type ZurgConfig struct {
Port string `yaml:"port"`
NumOfWorkers int `yaml:"concurrent_workers"`
RefreshEverySeconds int `yaml:"check_for_changes_every_secs"`
CacheTimeHours int `yaml:"info_cache_time_hours"`
CanRepair bool `yaml:"enable_repair"`
OnLibraryUpdate string `yaml:"on_library_update"`
NetworkBufferSize int `yaml:"network_buffer_size"`
@@ -50,10 +66,6 @@ func (z *ZurgConfig) GetRefreshEverySeconds() int {
return z.RefreshEverySeconds
}
func (z *ZurgConfig) GetCacheTimeHours() int {
return z.CacheTimeHours
}
func (z *ZurgConfig) EnableRepair() bool {
return z.CanRepair
}