fixed missing download location
This commit is contained in:
@@ -25,6 +25,9 @@ public sealed record TorrentStatus
|
|||||||
public float Ratio { get; init; }
|
public float Ratio { get; init; }
|
||||||
|
|
||||||
public required IReadOnlyList<Tracker> Trackers { get; init; }
|
public required IReadOnlyList<Tracker> Trackers { get; init; }
|
||||||
|
|
||||||
|
[JsonProperty("download_location")]
|
||||||
|
public required string DownloadLocation { get; init; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public sealed record Tracker
|
public sealed record Tracker
|
||||||
|
|||||||
@@ -27,7 +27,8 @@ public sealed class DelugeClient
|
|||||||
"label",
|
"label",
|
||||||
"seeding_time",
|
"seeding_time",
|
||||||
"ratio",
|
"ratio",
|
||||||
"trackers"
|
"trackers",
|
||||||
|
"download_location"
|
||||||
];
|
];
|
||||||
|
|
||||||
public DelugeClient(IOptions<DelugeConfig> config, IHttpClientFactory httpClientFactory)
|
public DelugeClient(IOptions<DelugeConfig> config, IHttpClientFactory httpClientFactory)
|
||||||
|
|||||||
@@ -360,7 +360,9 @@ public class DelugeService : DownloadService, IDelugeService
|
|||||||
|
|
||||||
ProcessFiles(contents?.Contents, (_, file) =>
|
ProcessFiles(contents?.Contents, (_, file) =>
|
||||||
{
|
{
|
||||||
long hardlinkCount = _hardLinkFileService.GetHardLinkCount(file.Path, !string.IsNullOrEmpty(_downloadCleanerConfig.UnlinkedIgnoredRootDir));
|
string filePath = string.Join(Path.DirectorySeparatorChar, Path.Combine(download.DownloadLocation, file.Path).Split(['\\', '/']));
|
||||||
|
|
||||||
|
long hardlinkCount = _hardLinkFileService.GetHardLinkCount(filePath, !string.IsNullOrEmpty(_downloadCleanerConfig.UnlinkedIgnoredRootDir));
|
||||||
|
|
||||||
if (hardlinkCount < 0)
|
if (hardlinkCount < 0)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user