Merge branch 'main' of https://github.com/rogerfar/rdt-client
This commit is contained in:
commit
d436ea2482
2 changed files with 5 additions and 1 deletions
|
|
@ -204,6 +204,10 @@ or
|
||||||
[Description("The interval to check the torrents info on the providers API. Minumum is 3 seconds. When there are no active downloads this limit is increased * 3.")]
|
[Description("The interval to check the torrents info on the providers API. Minumum is 3 seconds. When there are no active downloads this limit is increased * 3.")]
|
||||||
public Int32 CheckInterval { get; set; } = 10;
|
public Int32 CheckInterval { get; set; } = 10;
|
||||||
|
|
||||||
|
[DisplayName("Prefer zipped downloads")]
|
||||||
|
[Description("Torbox only. When selected, rdt-client will try to download the entire torrent as a .zip from TorBox and unpack it instead of downloading each file individually.")]
|
||||||
|
public Boolean PreferZippedDownloads { get; set; } = false;
|
||||||
|
|
||||||
[DisplayName("Auto Import Defaults")]
|
[DisplayName("Auto Import Defaults")]
|
||||||
public DbSettingsDefaultsWithCategory Default { get; set; } = new();
|
public DbSettingsDefaultsWithCategory Default { get; set; } = new();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -289,7 +289,7 @@ public class TorBoxTorrentClient(ILogger<TorBoxTorrentClient> logger, IHttpClien
|
||||||
var torrentId = await GetClient().Torrents.GetHashInfoAsync(torrent.Hash, skipCache: true);
|
var torrentId = await GetClient().Torrents.GetHashInfoAsync(torrent.Hash, skipCache: true);
|
||||||
var downloadableFiles = torrent.Files.Where(file => fileFilter.IsDownloadable(torrent, file.Path, file.Bytes)).ToList();
|
var downloadableFiles = torrent.Files.Where(file => fileFilter.IsDownloadable(torrent, file.Path, file.Bytes)).ToList();
|
||||||
|
|
||||||
if (downloadableFiles.Count == torrent.Files.Count && torrent.DownloadClient != Data.Enums.DownloadClient.Symlink)
|
if (downloadableFiles.Count == torrent.Files.Count && torrent.DownloadClient != Data.Enums.DownloadClient.Symlink && Settings.Get.Provider.PreferZippedDownloads)
|
||||||
{
|
{
|
||||||
logger.LogDebug("Downloading files from TorBox as a zip.");
|
logger.LogDebug("Downloading files from TorBox as a zip.");
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue