Add tag support to Sonarr/Radarr requests

This commit is contained in:
WSHaRK93
2026-01-03 11:07:48 +01:00
parent 083e806d43
commit 4e09b14318
8 changed files with 93 additions and 1 deletions

8
pvr.go
View File

@@ -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
}
}