Add tag support to Sonarr/Radarr requests
This commit is contained in:
@@ -183,6 +183,12 @@ func (c *Client) AddMediaItem(item *media.Item, opts ...nabarr.PvrOption) error
|
||||
return fmt.Errorf("converting tvdb id to int: %q", item.TvdbId)
|
||||
}
|
||||
|
||||
// prepare tags
|
||||
tags := []string{}
|
||||
if o.Tag != "" {
|
||||
tags = []string{o.Tag}
|
||||
}
|
||||
|
||||
req := addRequest{
|
||||
Title: item.Title,
|
||||
TitleSlug: item.Slug,
|
||||
@@ -190,7 +196,7 @@ func (c *Client) AddMediaItem(item *media.Item, opts ...nabarr.PvrOption) error
|
||||
QualityProfileId: c.qualityProfileId,
|
||||
LanguageProfileId: c.languageProfileId,
|
||||
Images: []string{},
|
||||
Tags: []string{},
|
||||
Tags: tags,
|
||||
Monitored: o.AddMonitored,
|
||||
RootFolderPath: c.rootFolder,
|
||||
AddOptions: addOptions{
|
||||
|
||||
Reference in New Issue
Block a user