Remove get torrents count config and use worker pool on all places
This commit is contained in:
@@ -36,7 +36,6 @@ type ConfigInterface interface {
|
||||
GetDownloadsEveryMins() int
|
||||
GetDumpTorrentsEveryMins() int
|
||||
GetPlayableExtensions() []string
|
||||
GetTorrentsCount() int
|
||||
}
|
||||
|
||||
type ZurgConfig struct {
|
||||
@@ -46,7 +45,6 @@ type ZurgConfig struct {
|
||||
ApiTimeoutSecs int `yaml:"api_timeout_secs" json:"api_timeout_secs"`
|
||||
CanRepair bool `yaml:"enable_repair" json:"enable_repair"`
|
||||
DownloadsEveryMins int `yaml:"downloads_every_mins" json:"downloads_every_mins"`
|
||||
DownloadsLimit int `yaml:"downloads_limit" json:"downloads_limit"`
|
||||
DumpTorrentsEveryMins int `yaml:"dump_torrents_every_mins" json:"dump_torrents_every_mins"`
|
||||
DownloadTimeoutSecs int `yaml:"download_timeout_secs" json:"download_timeout_secs"`
|
||||
ForceIPv6 bool `yaml:"force_ipv6" json:"force_ipv6"`
|
||||
@@ -66,7 +64,6 @@ type ZurgConfig struct {
|
||||
RetainRDTorrentName bool `yaml:"retain_rd_torrent_name" json:"retain_rd_torrent_name"`
|
||||
RetriesUntilFailed int `yaml:"retries_until_failed" json:"retries_until_failed"`
|
||||
ServeFromRclone bool `yaml:"serve_from_rclone" json:"serve_from_rclone"`
|
||||
TorrentsCount int `yaml:"get_torrents_count" json:"get_torrents_count"`
|
||||
Username string `yaml:"username" json:"username"`
|
||||
RarAction string `yaml:"rar_action" json:"rar_action"`
|
||||
}
|
||||
@@ -226,10 +223,3 @@ func (z *ZurgConfig) GetPlayableExtensions() []string {
|
||||
}
|
||||
return z.PlayableExtensions
|
||||
}
|
||||
|
||||
func (z *ZurgConfig) GetTorrentsCount() int {
|
||||
if z.TorrentsCount == 0 {
|
||||
return 250
|
||||
}
|
||||
return z.TorrentsCount
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user