Add retain_rd_torrent_name setting

This commit is contained in:
Ben Sarmiento
2023-11-23 01:40:08 +01:00
parent 77b16791ef
commit addac3cc9f
2 changed files with 24 additions and 0 deletions

View File

@@ -16,6 +16,7 @@ type ConfigInterface interface {
GetNetworkBufferSize() int
GetMountPoint() string
EnableRetainFolderNameExtension() bool
EnableRetainRDTorrentName() bool
GetRandomPreferredHost() string
}
@@ -31,6 +32,7 @@ type ZurgConfig struct {
NetworkBufferSize int `yaml:"network_buffer_size"`
MountPoint string `yaml:"mount_point"`
RetainFolderNameExtension bool `yaml:"retain_folder_name_extension"`
RetainRDTorrentName bool `yaml:"retain_rd_torrent_name"`
PreferredHosts []string `yaml:"preferred_hosts"`
}
@@ -92,6 +94,10 @@ func (z *ZurgConfig) EnableRetainFolderNameExtension() bool {
return z.RetainFolderNameExtension
}
func (z *ZurgConfig) EnableRetainRDTorrentName() bool {
return z.RetainRDTorrentName
}
func (z *ZurgConfig) GetRandomPreferredHost() string {
if len(z.PreferredHosts) == 0 {
return ""