From 8ef80ba135fee43125defa799b5c8bdaeff7fdbf Mon Sep 17 00:00:00 2001 From: Qstick Date: Thu, 15 Feb 2018 21:46:03 -0500 Subject: [PATCH] Fixed: Send category to qBittorrent when adding torrent/magnet --- .../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 cdb79255d..dbd015f20 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.TvCategory.IsNotNullOrWhiteSpace()) + { + request.AddFormParameter("category", settings.TvCategory); + } + 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.TvCategory.IsNotNullOrWhiteSpace()) + { + request.AddFormParameter("category", settings.TvCategory); + } + ProcessRequest(request, settings); }