diff --git a/server/RdtClient.Data/Models/Internal/DbSettings.cs b/server/RdtClient.Data/Models/Internal/DbSettings.cs index 14c8606..8a67e9d 100644 --- a/server/RdtClient.Data/Models/Internal/DbSettings.cs +++ b/server/RdtClient.Data/Models/Internal/DbSettings.cs @@ -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")] diff --git a/server/RdtClient.Service/Services/TorrentRunner.cs b/server/RdtClient.Service/Services/TorrentRunner.cs index b137275..e7ba302 100644 --- a/server/RdtClient.Service/Services/TorrentRunner.cs +++ b/server/RdtClient.Service/Services/TorrentRunner.cs @@ -81,9 +81,9 @@ public class TorrentRunner(ILogger logger, Torrents torrents, Dow } var settingUnpackLimit = Settings.Get.General.UnpackLimit; - if (settingUnpackLimit < 1) + if (settingUnpackLimit < 0) { - settingUnpackLimit = 1; + settingUnpackLimit = 0; } var settingDownloadPath = Settings.Get.DownloadClient.DownloadPath; @@ -485,7 +485,8 @@ public class TorrentRunner(ILogger 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);