Skip to content

Commit

Permalink
Merge pull request #8 from F4n4t/fix/post-processing-parameters
Browse files Browse the repository at this point in the history
convert post-processing parameters into a slice of strings
  • Loading branch information
davidnewhall authored Aug 10, 2023
2 parents c237671 + 1da20c7 commit 3ac8569
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion methods.go
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,11 @@ func (n *NZBGet) Append(input *AppendInput) (int64, error) {
// AppendContext adds a nzb-file or URL to the download queue.
// https://nzbget.net/api/append
func (n *NZBGet) AppendContext(ctx context.Context, input *AppendInput) (int64, error) {
var parameters [][]string
for _, p := range input.Parameters {
parameters = append(parameters, []string{p.Name, p.Value})
}

var output int64
err := n.GetInto(ctx, "append", &output,
input.Filename,
Expand All @@ -431,7 +436,7 @@ func (n *NZBGet) AppendContext(ctx context.Context, input *AppendInput) (int64,
input.DupeKey,
input.DupeScore,
input.DupeMode,
input.Parameters,
parameters,
)

return output, err
Expand Down

0 comments on commit 3ac8569

Please sign in to comment.