Add tag support to Sonarr/Radarr requests
This commit is contained in:
8
pvr.go
8
pvr.go
@@ -23,6 +23,7 @@ type PvrConfig struct {
|
||||
} `yaml:"options"`
|
||||
Filters PvrFilters `yaml:"filters"`
|
||||
CacheDuration time.Duration `yaml:"cache_duration"`
|
||||
Tag string `yaml:"tag,omitempty"`
|
||||
Verbosity string `yaml:"verbosity,omitempty"`
|
||||
}
|
||||
|
||||
@@ -40,6 +41,7 @@ type PvrOptions struct {
|
||||
|
||||
AddMonitored bool
|
||||
SearchMissing bool
|
||||
Tag string
|
||||
}
|
||||
|
||||
func BuildPvrOptions(opts ...PvrOption) (*PvrOptions, error) {
|
||||
@@ -69,3 +71,9 @@ func WithSearchMissing(missing bool) PvrOption {
|
||||
opts.SearchMissing = missing
|
||||
}
|
||||
}
|
||||
|
||||
func WithTag(tag string) PvrOption {
|
||||
return func(opts *PvrOptions) {
|
||||
opts.Tag = tag
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user