Use a proper client for fetch byte
This commit is contained in:
@@ -18,6 +18,7 @@ type ConfigInterface interface {
|
||||
EnableRetainFolderNameExtension() bool
|
||||
EnableRetainRDTorrentName() bool
|
||||
GetRandomPreferredHost() string
|
||||
ShouldServeFromRclone() bool
|
||||
}
|
||||
|
||||
type ZurgConfig struct {
|
||||
@@ -34,6 +35,7 @@ type ZurgConfig struct {
|
||||
RetainFolderNameExtension bool `yaml:"retain_folder_name_extension"`
|
||||
RetainRDTorrentName bool `yaml:"retain_rd_torrent_name"`
|
||||
PreferredHosts []string `yaml:"preferred_hosts"`
|
||||
ServeFromRclone bool `yaml:"serve_from_rclone"`
|
||||
}
|
||||
|
||||
func (z *ZurgConfig) GetToken() string {
|
||||
@@ -105,3 +107,7 @@ func (z *ZurgConfig) GetRandomPreferredHost() string {
|
||||
randomIndex := rand.Intn(len(z.PreferredHosts))
|
||||
return z.PreferredHosts[randomIndex]
|
||||
}
|
||||
|
||||
func (z *ZurgConfig) ShouldServeFromRclone() bool {
|
||||
return z.ServeFromRclone
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user