From 2088f5e92daa2884faef48c686602be2c77e8711 Mon Sep 17 00:00:00 2001 From: themagicbullet <36876133+themagicbullet@users.noreply.github.com> Date: Mon, 19 Mar 2018 19:44:35 +0900 Subject: [PATCH] Fixed: Set category when adding torrent to qBittorrent (#2649) Hopefully fixes: #2200 --- .../Download/Clients/QBittorrent/QBittorrentProxy.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/NzbDrone.Core/Download/Clients/QBittorrent/QBittorrentProxy.cs b/src/NzbDrone.Core/Download/Clients/QBittorrent/QBittorrentProxy.cs index 948d3a06b..2fcbaa4c0 100644 --- a/src/NzbDrone.Core/Download/Clients/QBittorrent/QBittorrentProxy.cs +++ b/src/NzbDrone.Core/Download/Clients/QBittorrent/QBittorrentProxy.cs @@ -75,6 +75,11 @@ namespace NzbDrone.Core.Download.Clients.QBittorrent .Post() .AddFormParameter("urls", torrentUrl); + if (settings.MovieCategory.IsNotNullOrWhiteSpace()) + { + request.AddFormParameter("category", settings.MovieCategory); + } + var result = ProcessRequest(request, settings); // Note: Older qbit versions returned nothing, so we can't do != "Ok." here. @@ -105,6 +110,11 @@ namespace NzbDrone.Core.Download.Clients.QBittorrent .Post() .AddFormParameter("hashes", hash); + if (settings.MovieCategory.IsNotNullOrWhiteSpace()) + { + request.AddFormParameter("category", settings.MovieCategory); + } + ProcessRequest(request, settings); }