Access key computation without clearing data

This commit is contained in:
Ben Sarmiento
2024-01-10 02:36:12 +01:00
parent 91f6d35831
commit ed87c2bbcc
12 changed files with 146 additions and 78 deletions

View File

@@ -19,6 +19,7 @@ type ConfigInterface interface {
GetNetworkBufferSize() int
EnableRetainFolderNameExtension() bool
EnableRetainRDTorrentName() bool
ShouldAllowRenames() bool
GetRandomPreferredHost() string
ShouldServeFromRclone() bool
ShouldVerifyDownloadLink() bool
@@ -41,6 +42,7 @@ type ZurgConfig struct {
NumOfWorkers int `yaml:"concurrent_workers" json:"concurrent_workers"`
RefreshEverySeconds int `yaml:"check_for_changes_every_secs" json:"check_for_changes_every_secs"`
AllowRenames bool `yaml:"allow_renames" json:"allow_renames"`
RetainRDTorrentName bool `yaml:"retain_rd_torrent_name" json:"retain_rd_torrent_name"`
RetainFolderNameExtension bool `yaml:"retain_folder_name_extension" json:"retain_folder_name_extension"`
@@ -127,6 +129,10 @@ func (z *ZurgConfig) EnableRetainRDTorrentName() bool {
return z.RetainRDTorrentName
}
func (z *ZurgConfig) ShouldAllowRenames() bool {
return z.AllowRenames
}
func (z *ZurgConfig) GetRandomPreferredHost() string {
if len(z.PreferredHosts) == 0 {
return ""