mirror of https://github.com/Radarr/Radarr
Use full path for OutputPath in FreeBox
This commit is contained in:
parent
f77e27bace
commit
a0f39293a8
|
@ -346,7 +346,7 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.FreeboxDownloadTests
|
||||||
var items = Subject.GetItems();
|
var items = Subject.GetItems();
|
||||||
|
|
||||||
items.Should().HaveCount(1);
|
items.Should().HaveCount(1);
|
||||||
items.First().OutputPath.Should().Be(decodedDownloadDirectory);
|
items.First().OutputPath.Should().Be($"{decodedDownloadDirectory}/name");
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
|
|
|
@ -69,6 +69,8 @@ namespace NzbDrone.Core.Download.Clients.FreeboxDownload
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
outputPath = _remotePathMappingService.RemapRemoteToLocal(Settings.Host, outputPath);
|
||||||
|
|
||||||
var item = new DownloadClientItem()
|
var item = new DownloadClientItem()
|
||||||
{
|
{
|
||||||
DownloadId = torrent.Id,
|
DownloadId = torrent.Id,
|
||||||
|
@ -79,7 +81,7 @@ namespace NzbDrone.Core.Download.Clients.FreeboxDownload
|
||||||
RemainingSize = (long)(torrent.Size * (double)(1 - ((double)torrent.ReceivedPrct / 10000))),
|
RemainingSize = (long)(torrent.Size * (double)(1 - ((double)torrent.ReceivedPrct / 10000))),
|
||||||
RemainingTime = torrent.Eta <= 0 ? null : TimeSpan.FromSeconds(torrent.Eta),
|
RemainingTime = torrent.Eta <= 0 ? null : TimeSpan.FromSeconds(torrent.Eta),
|
||||||
SeedRatio = torrent.StopRatio <= 0 ? 0 : torrent.StopRatio / 100,
|
SeedRatio = torrent.StopRatio <= 0 ? 0 : torrent.StopRatio / 100,
|
||||||
OutputPath = _remotePathMappingService.RemapRemoteToLocal(Settings.Host, outputPath)
|
OutputPath = GetOutputPath(outputPath, torrent)
|
||||||
};
|
};
|
||||||
|
|
||||||
switch (torrent.Status)
|
switch (torrent.Status)
|
||||||
|
@ -230,5 +232,10 @@ namespace NzbDrone.Core.Download.Clients.FreeboxDownload
|
||||||
|
|
||||||
return remoteMovie.SeedConfiguration.Ratio.Value * 100;
|
return remoteMovie.SeedConfiguration.Ratio.Value * 100;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private OsPath GetOutputPath(OsPath outputPath, FreeboxDownloadTask torrent)
|
||||||
|
{
|
||||||
|
return outputPath + torrent.Name;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue