diff --git a/internal/config/load.go b/internal/config/load.go index 3ee3ac6..b497a60 100644 --- a/internal/config/load.go +++ b/internal/config/load.go @@ -8,24 +8,6 @@ import ( "gopkg.in/yaml.v3" ) -type ConfigInterface interface { - GetVersion() string - GetToken() string - GetNumOfWorkers() int - GetRefreshEverySeconds() int - GetCacheTimeHours() 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 -} - func LoadZurgConfig(filename string) (ConfigInterface, error) { log := logutil.NewLogger().Named("config") diff --git a/internal/config/types.go b/internal/config/types.go index fe89ed7..bdd1684 100644 --- a/internal/config/types.go +++ b/internal/config/types.go @@ -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 }