Skip to content

Commit 1da20c7

Browse files
committed
convert post-processing parameters into a slice of strings
1 parent c237671 commit 1da20c7

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

methods.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,6 +420,11 @@ func (n *NZBGet) Append(input *AppendInput) (int64, error) {
420420
// AppendContext adds a nzb-file or URL to the download queue.
421421
// https://nzbget.net/api/append
422422
func (n *NZBGet) AppendContext(ctx context.Context, input *AppendInput) (int64, error) {
423+
var parameters [][]string
424+
for _, p := range input.Parameters {
425+
parameters = append(parameters, []string{p.Name, p.Value})
426+
}
427+
423428
var output int64
424429
err := n.GetInto(ctx, "append", &output,
425430
input.Filename,
@@ -431,7 +436,7 @@ func (n *NZBGet) AppendContext(ctx context.Context, input *AppendInput) (int64,
431436
input.DupeKey,
432437
input.DupeScore,
433438
input.DupeMode,
434-
input.Parameters,
439+
parameters,
435440
)
436441

437442
return output, err

0 commit comments

Comments
 (0)