mirror of
https://github.com/lidarr/Lidarr
synced 2025-02-26 15:52:42 +00:00
Fixed: Initially pausing torrents in QBittorrent
Co-Authored-By: Mark McDowall <markus101@users.noreply.github.com>
This commit is contained in:
parent
e669e2262f
commit
7db8226099
1 changed files with 11 additions and 1 deletions
|
@ -80,6 +80,11 @@ public void AddTorrentFromUrl(string torrentUrl, QBittorrentSettings settings)
|
||||||
request.AddFormParameter("category", settings.MusicCategory);
|
request.AddFormParameter("category", settings.MusicCategory);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ((QBittorrentState)settings.InitialState == QBittorrentState.Pause)
|
||||||
|
{
|
||||||
|
request.AddFormParameter("paused", true);
|
||||||
|
}
|
||||||
|
|
||||||
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.
|
||||||
|
@ -100,6 +105,11 @@ public void AddTorrentFromFile(string fileName, Byte[] fileContent, QBittorrentS
|
||||||
request.AddFormParameter("category", settings.MusicCategory);
|
request.AddFormParameter("category", settings.MusicCategory);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ((QBittorrentState)settings.InitialState == QBittorrentState.Pause)
|
||||||
|
{
|
||||||
|
request.AddFormParameter("paused", true);
|
||||||
|
}
|
||||||
|
|
||||||
var result = ProcessRequest(request, settings);
|
var result = ProcessRequest(request, settings);
|
||||||
|
|
||||||
// Note: Current qbit versions return nothing, so we can't do != "Ok." here.
|
// Note: Current qbit versions return nothing, so we can't do != "Ok." here.
|
||||||
|
|
Loading…
Reference in a new issue