Add basic auth and fix repair issues
This commit is contained in:
@@ -11,6 +11,8 @@ type ConfigInterface interface {
|
||||
EnableRepair() bool
|
||||
GetHost() string
|
||||
GetPort() string
|
||||
GetUsername() string
|
||||
GetPassword() string
|
||||
GetDirectories() []string
|
||||
MeetsConditions(directory, torrentName string, torrentSize int64, torrentIDs, fileNames []string, fileSizes []int64) bool
|
||||
GetOnLibraryUpdate() string
|
||||
@@ -34,6 +36,8 @@ type ZurgConfig struct {
|
||||
|
||||
Host string `yaml:"host" json:"host"`
|
||||
Port string `yaml:"port" json:"port"`
|
||||
Username string `yaml:"username" json:"username"`
|
||||
Password string `yaml:"password" json:"password"`
|
||||
NumOfWorkers int `yaml:"concurrent_workers" json:"concurrent_workers"`
|
||||
RefreshEverySeconds int `yaml:"check_for_changes_every_secs" json:"check_for_changes_every_secs"`
|
||||
|
||||
@@ -78,6 +82,14 @@ func (z *ZurgConfig) GetPort() string {
|
||||
return z.Port
|
||||
}
|
||||
|
||||
func (z *ZurgConfig) GetUsername() string {
|
||||
return z.Username
|
||||
}
|
||||
|
||||
func (z *ZurgConfig) GetPassword() string {
|
||||
return z.Password
|
||||
}
|
||||
|
||||
func (z *ZurgConfig) GetNumOfWorkers() int {
|
||||
if z.NumOfWorkers == 0 {
|
||||
return 50
|
||||
|
||||
Reference in New Issue
Block a user