its the fastest ever
This commit is contained in:
@@ -5,8 +5,8 @@ type ConfigInterface interface {
|
||||
GetVersion() string
|
||||
GetToken() string
|
||||
GetNumOfWorkers() int
|
||||
GetRefreshEverySeconds() int
|
||||
GetRepairEveryMinutes() int
|
||||
GetRefreshEverySecs() int
|
||||
GetRepairEveryMins() int
|
||||
EnableRepair() bool
|
||||
GetHost() string
|
||||
GetPort() string
|
||||
@@ -23,10 +23,11 @@ type ConfigInterface interface {
|
||||
ShouldServeFromRclone() bool
|
||||
ShouldVerifyDownloadLink() bool
|
||||
ShouldForceIPv6() bool
|
||||
GetRealDebridTimeout() int
|
||||
GetApiTimeoutSecs() int
|
||||
GetDownloadTimeoutSecs() int
|
||||
GetRetriesUntilFailed() int
|
||||
EnableDownloadMount() bool
|
||||
GetRateLimitSleepSeconds() int
|
||||
GetRateLimitSleepSecs() int
|
||||
ShouldDeleteRarFiles() bool
|
||||
}
|
||||
|
||||
@@ -34,14 +35,14 @@ type ZurgConfig struct {
|
||||
Version string `yaml:"zurg" json:"-"`
|
||||
Token string `yaml:"token" json:"-"`
|
||||
|
||||
Host string `yaml:"host" json:"host"`
|
||||
Port string `yaml:"port" json:"port"`
|
||||
Username string `yaml:"username" json:"username"`
|
||||
Password string `yaml:"password" json:"password"`
|
||||
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"`
|
||||
Host string `yaml:"host" json:"host"`
|
||||
Port string `yaml:"port" json:"port"`
|
||||
Username string `yaml:"username" json:"username"`
|
||||
Password string `yaml:"password" json:"password"`
|
||||
Proxy string `yaml:"proxy" json:"proxy"`
|
||||
NumOfWorkers int `yaml:"concurrent_workers" json:"concurrent_workers"`
|
||||
RefreshEverySecs 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"`
|
||||
@@ -50,14 +51,15 @@ type ZurgConfig struct {
|
||||
CanRepair bool `yaml:"enable_repair" json:"enable_repair"`
|
||||
DeleteRarFiles bool `yaml:"auto_delete_rar_torrents" json:"auto_delete_rar_torrents"`
|
||||
|
||||
RealDebridTimeout int `yaml:"realdebrid_timeout_secs" json:"realdebrid_timeout_secs"`
|
||||
DownloadMount bool `yaml:"enable_download_mount" json:"enable_download_mount"`
|
||||
RateLimitSleepSeconds int `yaml:"rate_limit_sleep_secs" json:"rate_limit_sleep_secs"`
|
||||
RetriesUntilFailed int `yaml:"retries_until_failed" json:"retries_until_failed"`
|
||||
NetworkBufferSize int `yaml:"network_buffer_size" json:"network_buffer_size"`
|
||||
ServeFromRclone bool `yaml:"serve_from_rclone" json:"serve_from_rclone"`
|
||||
VerifyDownloadLink bool `yaml:"verify_download_link" json:"verify_download_link"`
|
||||
ForceIPv6 bool `yaml:"force_ipv6" json:"force_ipv6"`
|
||||
ApiTimeoutSecs int `yaml:"api_timeout_secs" json:"api_timeout_secs"`
|
||||
DownloadTimeoutSecs int `yaml:"download_timeout_secs" json:"download_timeout_secs"`
|
||||
DownloadMount bool `yaml:"enable_download_mount" json:"enable_download_mount"`
|
||||
RateLimitSleepSecs int `yaml:"rate_limit_sleep_secs" json:"rate_limit_sleep_secs"`
|
||||
RetriesUntilFailed int `yaml:"retries_until_failed" json:"retries_until_failed"`
|
||||
NetworkBufferSize int `yaml:"network_buffer_size" json:"network_buffer_size"`
|
||||
ServeFromRclone bool `yaml:"serve_from_rclone" json:"serve_from_rclone"`
|
||||
VerifyDownloadLink bool `yaml:"verify_download_link" json:"verify_download_link"`
|
||||
ForceIPv6 bool `yaml:"force_ipv6" json:"force_ipv6"`
|
||||
|
||||
OnLibraryUpdate string `yaml:"on_library_update" json:"on_library_update"`
|
||||
}
|
||||
@@ -103,14 +105,14 @@ func (z *ZurgConfig) GetNumOfWorkers() int {
|
||||
return z.NumOfWorkers
|
||||
}
|
||||
|
||||
func (z *ZurgConfig) GetRefreshEverySeconds() int {
|
||||
if z.RefreshEverySeconds == 0 {
|
||||
func (z *ZurgConfig) GetRefreshEverySecs() int {
|
||||
if z.RefreshEverySecs == 0 {
|
||||
return 60
|
||||
}
|
||||
return z.RefreshEverySeconds
|
||||
return z.RefreshEverySecs
|
||||
}
|
||||
|
||||
func (z *ZurgConfig) GetRepairEveryMinutes() int {
|
||||
func (z *ZurgConfig) GetRepairEveryMins() int {
|
||||
if z.RepairEveryMins == 0 {
|
||||
return 60
|
||||
}
|
||||
@@ -167,18 +169,25 @@ func (z *ZurgConfig) EnableDownloadMount() bool {
|
||||
return z.DownloadMount
|
||||
}
|
||||
|
||||
func (z *ZurgConfig) GetRealDebridTimeout() int {
|
||||
if z.RealDebridTimeout == 0 {
|
||||
func (z *ZurgConfig) GetApiTimeoutSecs() int {
|
||||
if z.ApiTimeoutSecs == 0 {
|
||||
return 4
|
||||
}
|
||||
return z.RealDebridTimeout
|
||||
return z.ApiTimeoutSecs
|
||||
}
|
||||
|
||||
func (z *ZurgConfig) GetRateLimitSleepSeconds() int {
|
||||
if z.RateLimitSleepSeconds == 0 {
|
||||
func (z *ZurgConfig) GetDownloadTimeoutSecs() int {
|
||||
if z.DownloadTimeoutSecs == 0 {
|
||||
return 2
|
||||
}
|
||||
return z.DownloadTimeoutSecs
|
||||
}
|
||||
|
||||
func (z *ZurgConfig) GetRateLimitSleepSecs() int {
|
||||
if z.RateLimitSleepSecs == 0 {
|
||||
return 4
|
||||
}
|
||||
return z.RateLimitSleepSeconds
|
||||
return z.RateLimitSleepSecs
|
||||
}
|
||||
|
||||
func (z *ZurgConfig) ShouldDeleteRarFiles() bool {
|
||||
|
||||
Reference in New Issue
Block a user