From 71dc83f8a25649066be14392fad6ed173810ac96 Mon Sep 17 00:00:00 2001 From: Foireatout Date: Mon, 13 Apr 2026 14:46:05 +0200 Subject: [PATCH] Update TorrentFreeboxDownload.cs - I hope really without tabs ! --- .../FreeboxDownload/TorrentFreeboxDownload.cs | 73 ++++++++----------- 1 file changed, 31 insertions(+), 42 deletions(-) diff --git a/src/NzbDrone.Core/Download/Clients/FreeboxDownload/TorrentFreeboxDownload.cs b/src/NzbDrone.Core/Download/Clients/FreeboxDownload/TorrentFreeboxDownload.cs index e7d9202812..32d65406a1 100644 --- a/src/NzbDrone.Core/Download/Clients/FreeboxDownload/TorrentFreeboxDownload.cs +++ b/src/NzbDrone.Core/Download/Clients/FreeboxDownload/TorrentFreeboxDownload.cs @@ -127,30 +127,19 @@ public override IEnumerable GetItems() return queueItems; } - protected override string AddFromMagnetLink(RemoteMovie remoteMovie, string hash, string magnetLink) - { - return _proxy.AddTaskFromUrl(magnetLink, - GetDownloadDirectory(remoteMovie).EncodeBase64(), - ToBePaused(), - ToBeQueuedFirst(remoteMovie), - GetSeedRatio(remoteMovie), - Settings); - } - protected override string AddFromTorrentFile(RemoteMovie remoteMovie, string hash, string filename, byte[] fileContent) - { - return _proxy.AddTaskFromFile(filename, - fileContent, - GetDownloadDirectory(remoteMovie).EncodeBase64(), - ToBePaused(), - ToBeQueuedFirst(remoteMovie), - GetSeedRatio(remoteMovie), - Settings); - } + protected override string AddFromMagnetLink(RemoteMovie remoteMovie, string hash, string magnetLink) + { + return _proxy.AddTaskFromUrl(magnetLink, GetDownloadDirectory(remoteMovie).EncodeBase64(), ToBePaused(), ToBeQueuedFirst(remoteMovie), GetSeedRatio(remoteMovie), Settings); + } + protected override string AddFromTorrentFile(RemoteMovie remoteMovie, string hash, string filename, byte[] fileContent) + { + return _proxy.AddTaskFromFile(filename, fileContent, GetDownloadDirectory(remoteMovie).EncodeBase64(), ToBePaused(), ToBeQueuedFirst(remoteMovie), GetSeedRatio(remoteMovie), Settings); + } public override void RemoveItem(DownloadClientItem item, bool deleteData) { _proxy.DeleteTask(item.DownloadId, deleteData, Settings); } - + public override DownloadClientInfo GetStatus() { var destDir = GetDownloadDirectory(); @@ -184,32 +173,32 @@ protected override void Test(List failures) } } - private string GetDownloadDirectory(RemoteMovie remoteMovie = null) - { - string destDir; + private string GetDownloadDirectory(RemoteMovie remoteMovie = null) + { + string destDir; - if (Settings.DestinationDirectory.IsNotNullOrWhiteSpace()) - { - destDir = Settings.DestinationDirectory.TrimEnd('/'); - } - else - { - destDir = _proxy.GetDownloadConfiguration(Settings).DecodedDownloadDirectory.TrimEnd('/'); - } + if (Settings.DestinationDirectory.IsNotNullOrWhiteSpace()) + { + destDir = Settings.DestinationDirectory.TrimEnd('/'); + } + else + { + destDir = _proxy.GetDownloadConfiguration(Settings).DecodedDownloadDirectory.TrimEnd('/'); + } - if (Settings.Category.IsNotNullOrWhiteSpace()) - { - destDir = $"{destDir}/{Settings.Category}"; - } + if (Settings.Category.IsNotNullOrWhiteSpace()) + { + destDir = $"{destDir}/{Settings.Category}"; + } - if (remoteMovie != null) - { - var folderName = FileNameExtensions.CleanFileName(remoteMovie.Release.Title); - destDir = $"{destDir}/{folderName}"; - } + if (remoteMovie != null) + { + var folderName = FileNameExtensions.CleanFileName(remoteMovie.Release.Title); + destDir = $"{destDir}/{folderName}"; + } - return destDir; - } + return destDir; + } private bool ToBePaused() {