Add retain_folder_name_extension option

This commit is contained in:
Ben Sarmiento
2023-11-07 17:20:54 +01:00
parent 3cc5044bc5
commit 0a76fdb14b
10 changed files with 41 additions and 74 deletions

View File

@@ -22,6 +22,7 @@ type ConfigInterface interface {
GetOnLibraryUpdate() string
GetNetworkBufferSize() int
GetMountPoint() string
EnableRetainFolderNameExtension() bool
}
func LoadZurgConfig(filename string) (ConfigInterface, error) {

View File

@@ -1,17 +1,18 @@
package config
type ZurgConfig struct {
Version string `yaml:"zurg"`
Token string `yaml:"token"`
Host string `yaml:"host"`
Port string `yaml:"port"`
NumOfWorkers int `yaml:"concurrent_workers"`
RefreshEverySeconds int `yaml:"check_for_changes_every_secs"`
CacheTimeHours int `yaml:"info_cache_time_hours"`
CanRepair bool `yaml:"enable_repair"`
OnLibraryUpdate string `yaml:"on_library_update"`
NetworkBufferSize int `yaml:"network_buffer_size"`
MountPoint string `yaml:"mount_point"`
Version string `yaml:"zurg"`
Token string `yaml:"token"`
Host string `yaml:"host"`
Port string `yaml:"port"`
NumOfWorkers int `yaml:"concurrent_workers"`
RefreshEverySeconds int `yaml:"check_for_changes_every_secs"`
CacheTimeHours int `yaml:"info_cache_time_hours"`
CanRepair bool `yaml:"enable_repair"`
OnLibraryUpdate string `yaml:"on_library_update"`
NetworkBufferSize int `yaml:"network_buffer_size"`
MountPoint string `yaml:"mount_point"`
RetainFolderNameExtension bool `yaml:"retain_folder_name_extension"`
}
func (z *ZurgConfig) GetToken() string {
@@ -68,3 +69,7 @@ func (z *ZurgConfig) GetNetworkBufferSize() int {
func (z *ZurgConfig) GetMountPoint() string {
return z.MountPoint
}
func (z *ZurgConfig) EnableRetainFolderNameExtension() bool {
return z.RetainFolderNameExtension
}