From 439b266946860a937be66b403127ab5cfd2edf70 Mon Sep 17 00:00:00 2001 From: Cucumberrbob <128094686+Cucumberrbob@users.noreply.github.com> Date: Thu, 20 Feb 2025 14:57:44 +0000 Subject: [PATCH] Actually use `GetSymlinkPath` --- server/RdtClient.Service/Services/DownloadClient.cs | 3 ++- .../Services/TorrentClients/AllDebridTorrentClient.cs | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/server/RdtClient.Service/Services/DownloadClient.cs b/server/RdtClient.Service/Services/DownloadClient.cs index 8c9d7b2..ef74a05 100644 --- a/server/RdtClient.Service/Services/DownloadClient.cs +++ b/server/RdtClient.Service/Services/DownloadClient.cs @@ -33,6 +33,8 @@ public class DownloadClient(Download download, Torrent torrent, String destinati try { + Type = torrent.DownloadClient; + if (download.Link == null) { throw new($"Invalid download link"); @@ -56,7 +58,6 @@ public class DownloadClient(Download download, Torrent torrent, String destinati throw new("Invalid download path"); } - Type = torrent.DownloadClient; if (Type != Data.Enums.DownloadClient.Symlink) { diff --git a/server/RdtClient.Service/Services/TorrentClients/AllDebridTorrentClient.cs b/server/RdtClient.Service/Services/TorrentClients/AllDebridTorrentClient.cs index ed8249a..41d29fc 100644 --- a/server/RdtClient.Service/Services/TorrentClients/AllDebridTorrentClient.cs +++ b/server/RdtClient.Service/Services/TorrentClients/AllDebridTorrentClient.cs @@ -191,7 +191,7 @@ public class AllDebridTorrentClient(ILogger logger, IHtt torrent.RdSize = torrentClientTorrent.Bytes; } - if (torrentClientTorrent.Files != null) + if (torrentClientTorrent.Files != null && torrentClientTorrent.Files.Any()) { torrent.RdFiles = JsonConvert.SerializeObject(torrentClientTorrent.Files); } @@ -248,6 +248,7 @@ public class AllDebridTorrentClient(ILogger logger, IHtt var allFiles = await GetClient().Magnet.FilesAsync(Int64.Parse(torrent.RdId)); var files = GetFiles(allFiles); + // torrent.RdFiles = JsonConvert.SerializeObject(files); Log($"Getting download links", torrent);