1
0
Fork 0
mirror of https://github.com/lidarr/Lidarr synced 2024-12-25 09:12:17 +00:00

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

View file

@ -75,6 +75,11 @@ public void AddTorrentFromUrl(string torrentUrl, QBittorrentSettings settings)
.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 @@ public void RemoveTorrent(string hash, Boolean removeData, QBittorrentSettings s
.Post()
.AddFormParameter("hashes", hash);
if (settings.TvCategory.IsNotNullOrWhiteSpace())
{
request.AddFormParameter("category", settings.TvCategory);
}
ProcessRequest(request, settings);
}