diff --git a/internal/commands.go b/internal/commands.go index 4afb878..b71d776 100644 --- a/internal/commands.go +++ b/internal/commands.go @@ -28,8 +28,10 @@ func NetworkTest() { logPath := fmt.Sprintf("logs/network-test-%s-%s.log", dateStr, timeStr) log := logutil.NewLogger(logPath) - repoClient4 := http.NewHTTPClient("", 0, 1, false, []string{}, os.Getenv("PROXY"), log.Named("network_test")) - repoClient6 := http.NewHTTPClient("", 0, 1, true, []string{}, os.Getenv("PROXY"), log.Named("network_test")) + proxyURL := os.Getenv("PROXY") + + repoClient4 := http.NewHTTPClient("", 0, 1, false, []string{}, proxyURL, log.Named("network_test")) + repoClient6 := http.NewHTTPClient("", 0, 1, true, []string{}, proxyURL, log.Named("network_test")) repo := http.NewIPRepository(repoClient4, repoClient6, log.Named("network_test")) repo.NetworkTest(true) } diff --git a/internal/config/types.go b/internal/config/types.go index 568246b..863c055 100644 --- a/internal/config/types.go +++ b/internal/config/types.go @@ -30,7 +30,6 @@ type ConfigInterface interface { GetApiTimeoutSecs() int GetDownloadTimeoutSecs() int GetRetriesUntilFailed() int - GetRateLimitSleepSecs() int GetRarAction() string GetDownloadsEveryMins() int GetDumpTorrentsEveryMins() int @@ -55,8 +54,6 @@ type ZurgConfig struct { Password string `yaml:"password" json:"password"` PlayableExtensions []string `yaml:"addl_playable_extensions" json:"addl_playable_extensions"` Port string `yaml:"port" json:"port"` - Proxy string `yaml:"proxy" json:"proxy"` - RateLimitSleepSecs int `yaml:"rate_limit_sleep_secs" json:"rate_limit_sleep_secs"` RefreshEverySecs int `yaml:"check_for_changes_every_secs" json:"check_for_changes_every_secs"` RepairEveryMins int `yaml:"repair_every_mins" json:"repair_every_mins"` RetainFolderNameExtension bool `yaml:"retain_folder_name_extension" json:"retain_folder_name_extension"` @@ -191,13 +188,6 @@ func (z *ZurgConfig) GetDownloadTimeoutSecs() int { return z.DownloadTimeoutSecs } -func (z *ZurgConfig) GetRateLimitSleepSecs() int { - if z.RateLimitSleepSecs == 0 { - return 4 - } - return z.RateLimitSleepSecs -} - // GetRarAction returns the action to take when a rar'ed torrent is found // none: do nothing (mark as unrepairable) // extract: extract the rar'ed torrent diff --git a/internal/handlers/home.go b/internal/handlers/home.go index f3efbe6..070b834 100644 --- a/internal/handlers/home.go +++ b/internal/handlers/home.go @@ -170,7 +170,7 @@ func (zr *Handlers) handleHome(resp http.ResponseWriter, req *http.Request) { %s - Config + Config Version %s @@ -230,10 +230,6 @@ func (zr *Handlers) handleHome(resp http.ResponseWriter, req *http.Request) { Download Timeout %d secs - - Rate Limit Sleep for... - %d secs - Retries Until Failed %d @@ -340,7 +336,6 @@ func (zr *Handlers) handleHome(resp http.ResponseWriter, req *http.Request) { response.Config.GetDumpTorrentsEveryMins(), response.Config.GetApiTimeoutSecs(), response.Config.GetDownloadTimeoutSecs(), - response.Config.GetRateLimitSleepSecs(), response.Config.GetRetriesUntilFailed(), response.Config.GetNetworkBufferSize(), response.Config.ShouldServeFromRclone(),