diff --git a/src/NzbDrone.Core.Test/Download/DownloadClientTests/FreeboxDownloadTests/TorrentFreeboxDownloadFixture.cs b/src/NzbDrone.Core.Test/Download/DownloadClientTests/FreeboxDownloadTests/TorrentFreeboxDownloadFixture.cs index dc10ff4f6..6828d26ae 100644 --- a/src/NzbDrone.Core.Test/Download/DownloadClientTests/FreeboxDownloadTests/TorrentFreeboxDownloadFixture.cs +++ b/src/NzbDrone.Core.Test/Download/DownloadClientTests/FreeboxDownloadTests/TorrentFreeboxDownloadFixture.cs @@ -346,7 +346,7 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.FreeboxDownloadTests var items = Subject.GetItems(); items.Should().HaveCount(1); - items.First().OutputPath.Should().Be(decodedDownloadDirectory); + items.First().OutputPath.Should().Be($"{decodedDownloadDirectory}/name"); } [Test] diff --git a/src/NzbDrone.Core/Download/Clients/FreeboxDownload/TorrentFreeboxDownload.cs b/src/NzbDrone.Core/Download/Clients/FreeboxDownload/TorrentFreeboxDownload.cs index 690829c5d..128bdebf7 100644 --- a/src/NzbDrone.Core/Download/Clients/FreeboxDownload/TorrentFreeboxDownload.cs +++ b/src/NzbDrone.Core/Download/Clients/FreeboxDownload/TorrentFreeboxDownload.cs @@ -69,6 +69,8 @@ namespace NzbDrone.Core.Download.Clients.FreeboxDownload } } + outputPath = _remotePathMappingService.RemapRemoteToLocal(Settings.Host, outputPath); + var item = new DownloadClientItem() { DownloadId = torrent.Id, @@ -79,7 +81,7 @@ namespace NzbDrone.Core.Download.Clients.FreeboxDownload RemainingSize = (long)(torrent.Size * (double)(1 - ((double)torrent.ReceivedPrct / 10000))), RemainingTime = torrent.Eta <= 0 ? null : TimeSpan.FromSeconds(torrent.Eta), SeedRatio = torrent.StopRatio <= 0 ? 0 : torrent.StopRatio / 100, - OutputPath = _remotePathMappingService.RemapRemoteToLocal(Settings.Host, outputPath) + OutputPath = GetOutputPath(outputPath, torrent) }; switch (torrent.Status) @@ -230,5 +232,10 @@ namespace NzbDrone.Core.Download.Clients.FreeboxDownload return remoteMovie.SeedConfiguration.Ratio.Value * 100; } + + private OsPath GetOutputPath(OsPath outputPath, FreeboxDownloadTask torrent) + { + return outputPath + torrent.Name; + } } }