This commit is contained in:
Ben Sarmiento
2023-12-02 20:37:40 +01:00
parent e4bdecd979
commit 3df201cc20
4 changed files with 42 additions and 13 deletions

View File

@@ -22,6 +22,7 @@ type ConfigInterface interface {
GetRealDebridTimeout() int
GetRetriesUntilFailed() int
EnableDownloadCache() bool
GetRateLimitSleepSeconds() int
}
type ZurgConfig struct {
@@ -34,6 +35,7 @@ type ZurgConfig struct {
CanRepair bool `yaml:"enable_repair"`
OnLibraryUpdate string `yaml:"on_library_update"`
NetworkBufferSize int `yaml:"network_buffer_size"`
RateLimitSleepSeconds int `yaml:"rate_limit_sleep_secs"`
RetainFolderNameExtension bool `yaml:"retain_folder_name_extension"`
RetainRDTorrentName bool `yaml:"retain_rd_torrent_name"`
PreferredHosts []string `yaml:"preferred_hosts"`
@@ -132,3 +134,10 @@ func (z *ZurgConfig) GetRealDebridTimeout() int {
}
return z.RealDebridTimeout
}
func (z *ZurgConfig) GetRateLimitSleepSeconds() int {
if z.RateLimitSleepSeconds == 0 {
return 4
}
return z.RateLimitSleepSeconds
}