Actually use GetSymlinkPath

This commit is contained in:
Cucumberrbob 2025-02-20 14:57:44 +00:00
parent fe241db5db
commit 439b266946
No known key found for this signature in database
GPG key ID: 2B935C47401C3614
2 changed files with 4 additions and 2 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,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)
{

View file

@ -191,7 +191,7 @@ public class AllDebridTorrentClient(ILogger<AllDebridTorrentClient> 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<AllDebridTorrentClient> 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);