Use full path for OutputPath in FreeBox

This commit is contained in:
Bogdan 2024-04-20 11:06:43 +03:00
parent f77e27bace
commit a0f39293a8
2 changed files with 9 additions and 2 deletions

View File

@ -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]

View File

@ -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;
}
}
}