Reachable hosts

This commit is contained in:
Ben Adrian Sarmiento
2024-06-24 01:21:09 +02:00
parent 449c0f71cf
commit 2e9a068780
5 changed files with 68 additions and 48 deletions

View File

@@ -34,6 +34,7 @@ type ConfigInterface interface {
GetVersion() string
MeetsConditions(directory, torrentName string, torrentSize int64, torrentIDs, fileNames []string, fileSizes []int64, mediaInfos []*ffprobe.ProbeData) bool
ShouldAutoAnalyzeNewTorrents() bool
ShouldCacheNetworkTestResults() bool
ShouldForceIPv6() bool
ShouldIgnoreRenames() bool
ShouldServeFromRclone() bool
@@ -45,6 +46,7 @@ type ZurgConfig struct {
ApiTimeoutSecs int `yaml:"api_timeout_secs" json:"api_timeout_secs"`
AutoAnalyzeNewTorrents bool `yaml:"auto_analyze_new_torrents" json:"auto_analyze_new_torrents"`
CacheNetworkTestResults bool `yaml:"cache_network_test_results" json:"cache_network_test_results"`
CanRepair bool `yaml:"enable_repair" json:"enable_repair"`
DownloadsEveryMins int `yaml:"downloads_every_mins" json:"downloads_every_mins"`
DownloadTimeoutSecs int `yaml:"download_timeout_secs" json:"download_timeout_secs"`
@@ -217,12 +219,13 @@ func (z *ZurgConfig) GetProxy() string {
}
func (z *ZurgConfig) GetNumberOfHosts() int {
if z.NumberOfHosts == 0 {
return 20
}
return z.NumberOfHosts
}
func (z *ZurgConfig) ShouldAutoAnalyzeNewTorrents() bool {
return z.AutoAnalyzeNewTorrents
}
func (z *ZurgConfig) ShouldCacheNetworkTestResults() bool {
return z.CacheNetworkTestResults
}