diff --git a/server/RdtClient.Service/Services/TorrentClients/RealDebridTorrentClient.cs b/server/RdtClient.Service/Services/TorrentClients/RealDebridTorrentClient.cs index 29528c3..7698a92 100644 --- a/server/RdtClient.Service/Services/TorrentClients/RealDebridTorrentClient.cs +++ b/server/RdtClient.Service/Services/TorrentClients/RealDebridTorrentClient.cs @@ -224,8 +224,18 @@ namespace RdtClient.Service.Services.TorrentClients { try { + if (torrent == null) + { + return null; + } + var rdTorrent = await GetInfo(torrent.RdId); + if (rdTorrent == null) + { + return torrent; + } + if (!String.IsNullOrWhiteSpace(rdTorrent.Filename)) { torrent.RdName = rdTorrent.Filename; @@ -279,7 +289,10 @@ namespace RdtClient.Service.Services.TorrentClients { if (ex.Message == "Resource not found") { - torrent.RdStatusRaw = "deleted"; + if (torrent != null) + { + torrent.RdStatusRaw = "deleted"; + } } else {