Fixed: Send category to qBittorrent when adding torrent/magnet

This commit is contained in:
Qstick 2018-02-15 21:46:03 -05:00
parent 8395999696
commit 8ef80ba135
1 changed files with 10 additions and 0 deletions

View File

@ -75,6 +75,11 @@ namespace NzbDrone.Core.Download.Clients.QBittorrent
.Post() .Post()
.AddFormParameter("urls", torrentUrl); .AddFormParameter("urls", torrentUrl);
if (settings.TvCategory.IsNotNullOrWhiteSpace())
{
request.AddFormParameter("category", settings.TvCategory);
}
var result = ProcessRequest(request, settings); var result = ProcessRequest(request, settings);
// Note: Older qbit versions returned nothing, so we can't do != "Ok." here. // Note: Older qbit versions returned nothing, so we can't do != "Ok." here.
@ -105,6 +110,11 @@ namespace NzbDrone.Core.Download.Clients.QBittorrent
.Post() .Post()
.AddFormParameter("hashes", hash); .AddFormParameter("hashes", hash);
if (settings.TvCategory.IsNotNullOrWhiteSpace())
{
request.AddFormParameter("category", settings.TvCategory);
}
ProcessRequest(request, settings); ProcessRequest(request, settings);
} }