make setting UnpackLimit to 0 turn unpacking off
This commit is contained in:
parent
ea3839514d
commit
e17c8c5c1a
2 changed files with 3 additions and 6 deletions
|
|
@ -43,7 +43,7 @@ public class DbSettingsGeneral
|
|||
public Int32 DownloadLimit { get; set; } = 2;
|
||||
|
||||
[DisplayName("Maximum unpack processes")]
|
||||
[Description("Maximum amount of downloads that get unpacked on your host at the same time.")]
|
||||
[Description("Maximum amount of downloads that get unpacked on your host at the same time. Set to 0 to disable unpacking.")]
|
||||
public Int32 UnpackLimit { get; set; } = 1;
|
||||
|
||||
[DisplayName("Categories")]
|
||||
|
|
|
|||
|
|
@ -81,10 +81,6 @@ public class TorrentRunner(ILogger<TorrentRunner> logger, Torrents torrents, Dow
|
|||
}
|
||||
|
||||
var settingUnpackLimit = Settings.Get.General.UnpackLimit;
|
||||
if (settingUnpackLimit < 1)
|
||||
{
|
||||
settingUnpackLimit = 1;
|
||||
}
|
||||
|
||||
var settingDownloadPath = Settings.Get.DownloadClient.DownloadPath;
|
||||
if (String.IsNullOrWhiteSpace(settingDownloadPath))
|
||||
|
|
@ -485,7 +481,8 @@ public class TorrentRunner(ILogger<TorrentRunner> logger, Torrents torrents, Dow
|
|||
var extension = Path.GetExtension(download.FileName);
|
||||
|
||||
if ((extension != ".rar" && extension != ".zip") ||
|
||||
torrent.DownloadClient == Data.Enums.DownloadClient.Symlink)
|
||||
torrent.DownloadClient == Data.Enums.DownloadClient.Symlink ||
|
||||
settingUnpackLimit == 0)
|
||||
{
|
||||
Log($"No need to unpack, setting it as unpacked", download, torrent);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue