fix(clients): rtorrent use directory instead of base_path (#472)

fix(clients): rtorrent use directory instead of base_path
This commit is contained in:
ze0s 2022-09-23 19:42:47 +02:00 committed by GitHub
parent 553320bf1d
commit 6fc8015887
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2,10 +2,9 @@ package action
import ( import (
"context" "context"
"os"
"github.com/autobrr/autobrr/internal/domain" "github.com/autobrr/autobrr/internal/domain"
"github.com/autobrr/autobrr/pkg/errors" "github.com/autobrr/autobrr/pkg/errors"
"os"
"github.com/mrobinsn/go-rtorrent/rtorrent" "github.com/mrobinsn/go-rtorrent/rtorrent"
) )
@ -47,13 +46,13 @@ func (s *service) rtorrent(action domain.Action, release domain.Release) ([]stri
if action.Label != "" { if action.Label != "" {
args = append(args, &rtorrent.FieldValue{ args = append(args, &rtorrent.FieldValue{
Field: "d.custom1", Field: rtorrent.DLabel,
Value: action.Label, Value: action.Label,
}) })
} }
if action.SavePath != "" { if action.SavePath != "" {
args = append(args, &rtorrent.FieldValue{ args = append(args, &rtorrent.FieldValue{
Field: "d.base_path", Field: rtorrent.DDirectory,
Value: action.SavePath, Value: action.SavePath,
}) })
} }