Merge pull request #715 from Cucumberrbob/fix/use-getsymlinkpath-method

Actually use `GetSymlinkPath` logic
This commit is contained in:
Roger Far 2025-02-23 11:24:23 -07:00 committed by GitHub
commit 7436e2d036
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View file

@ -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,8 +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)
{
await FileHelper.Delete(filePath);

View file

@ -199,7 +199,7 @@ public class AllDebridTorrentClient(ILogger<AllDebridTorrentClient> logger, IAll
torrent.RdSize = torrentClientTorrent.Bytes;
}
if (torrentClientTorrent.Files != null)
if (torrentClientTorrent.Files != null && torrentClientTorrent.Files.Any())
{
torrent.RdFiles = JsonConvert.SerializeObject(torrentClientTorrent.Files);
}