periodic repair
This commit is contained in:
@@ -6,6 +6,7 @@ type ConfigInterface interface {
|
||||
GetToken() string
|
||||
GetNumOfWorkers() int
|
||||
GetRefreshEverySeconds() int
|
||||
GetRepairEveryMinutes() int
|
||||
EnableRepair() bool
|
||||
GetHost() string
|
||||
GetPort() string
|
||||
@@ -40,6 +41,7 @@ type ZurgConfig struct {
|
||||
Proxy string `yaml:"proxy" json:"proxy"`
|
||||
NumOfWorkers int `yaml:"concurrent_workers" json:"concurrent_workers"`
|
||||
RefreshEverySeconds int `yaml:"check_for_changes_every_secs" json:"check_for_changes_every_secs"`
|
||||
RepairEveryMins int `yaml:"repair_every_mins" json:"repair_every_mins"`
|
||||
|
||||
IgnoreRenames bool `yaml:"ignore_renames" json:"ignore_renames"`
|
||||
RetainRDTorrentName bool `yaml:"retain_rd_torrent_name" json:"retain_rd_torrent_name"`
|
||||
@@ -108,6 +110,13 @@ func (z *ZurgConfig) GetRefreshEverySeconds() int {
|
||||
return z.RefreshEverySeconds
|
||||
}
|
||||
|
||||
func (z *ZurgConfig) GetRepairEveryMinutes() int {
|
||||
if z.RepairEveryMins == 0 {
|
||||
return 10
|
||||
}
|
||||
return z.RepairEveryMins
|
||||
}
|
||||
|
||||
func (z *ZurgConfig) EnableRepair() bool {
|
||||
return z.CanRepair
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user