mirror of
https://github.com/Prowlarr/Prowlarr
synced 2026-01-19 14:12:02 +01:00
New: Add qBittorrent option for Content Layout
(cherry picked from commit 4b22200708ca120cfdcf9cb796be92183adb95d1)
This commit is contained in:
parent
67eeb4373c
commit
ae1bc8366c
4 changed files with 23 additions and 0 deletions
|
|
@ -0,0 +1,9 @@
|
|||
namespace NzbDrone.Core.Download.Clients.QBittorrent
|
||||
{
|
||||
public enum QBittorrentContentLayout
|
||||
{
|
||||
Default = 0,
|
||||
Original = 1,
|
||||
Subfolder = 2
|
||||
}
|
||||
}
|
||||
|
|
@ -265,6 +265,15 @@ private void AddTorrentDownloadFormParameters(HttpRequestBuilder request, QBitto
|
|||
{
|
||||
request.AddFormParameter("firstLastPiecePrio", true);
|
||||
}
|
||||
|
||||
if ((QBittorrentContentLayout)settings.ContentLayout == QBittorrentContentLayout.Original)
|
||||
{
|
||||
request.AddFormParameter("contentLayout", "Original");
|
||||
}
|
||||
else if ((QBittorrentContentLayout)settings.ContentLayout == QBittorrentContentLayout.Subfolder)
|
||||
{
|
||||
request.AddFormParameter("contentLayout", "Subfolder");
|
||||
}
|
||||
}
|
||||
|
||||
public void SetTorrentSeedingConfiguration(string hash, TorrentSeedConfiguration seedConfiguration, QBittorrentSettings settings)
|
||||
|
|
|
|||
|
|
@ -62,6 +62,9 @@ public QBittorrentSettings()
|
|||
[FieldDefinition(10, Label = "First and Last First", Type = FieldType.Checkbox, HelpText = "Download first and last pieces first (qBittorrent 4.1.0+)")]
|
||||
public bool FirstAndLast { get; set; }
|
||||
|
||||
[FieldDefinition(13, Label = "DownloadClientQbittorrentSettingsContentLayout", Type = FieldType.Select, SelectOptions = typeof(QBittorrentContentLayout), HelpText = "DownloadClientQbittorrentSettingsContentLayoutHelpText")]
|
||||
public int ContentLayout { get; set; }
|
||||
|
||||
public NzbDroneValidationResult Validate()
|
||||
{
|
||||
return new NzbDroneValidationResult(Validator.Validate(this));
|
||||
|
|
|
|||
|
|
@ -173,6 +173,8 @@
|
|||
"DownloadClient": "Download Client",
|
||||
"DownloadClientCategory": "Download Client Category",
|
||||
"DownloadClientPriorityHelpText": "Prioritize multiple Download Clients. Round-Robin is used for clients with the same priority.",
|
||||
"DownloadClientQbittorrentSettingsContentLayout": "Content Layout",
|
||||
"DownloadClientQbittorrentSettingsContentLayoutHelpText": "Whether to use qBittorrent's configured content layout, the original layout from the torrent or always create a subfolder (qBittorrent 4.3.2+)",
|
||||
"DownloadClientSettings": "Download Client Settings",
|
||||
"DownloadClientStatusCheckAllClientMessage": "All download clients are unavailable due to failures",
|
||||
"DownloadClientStatusCheckSingleClientMessage": "Download clients unavailable due to failures: {0}",
|
||||
|
|
|
|||
Loading…
Reference in a new issue