Multi-token support

This commit is contained in:
Ben Adrian Sarmiento
2024-06-28 04:47:43 +02:00
parent 5e06f04f33
commit 962845fb81
15 changed files with 214 additions and 108 deletions

View File

@@ -15,6 +15,7 @@ type ConfigInterface interface {
GetDirectories() []string
GetDownloadsEveryMins() int
GetDownloadTimeoutSecs() int
GetDownloadTokens() []string
GetDumpTorrentsEveryMins() int
GetHost() string
GetNumberOfHosts() int
@@ -50,6 +51,7 @@ type ZurgConfig struct {
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"`
DownloadTokens []string `yaml:"download_tokens" json:"download_tokens"`
DumpTorrentsEveryMins int `yaml:"dump_torrents_every_mins" json:"dump_torrents_every_mins"`
ForceIPv6 bool `yaml:"force_ipv6" json:"force_ipv6"`
Host string `yaml:"host" json:"host"`
@@ -226,3 +228,7 @@ func (z *ZurgConfig) ShouldCacheNetworkTestResults() bool {
func (z *ZurgConfig) ShouldLogRequests() bool {
return z.LogRequests
}
func (z *ZurgConfig) GetDownloadTokens() []string {
return z.DownloadTokens
}