Fixed potential issue with the RealDebrid data mapper.

This commit is contained in:
Roger Far 2021-11-24 07:59:14 -07:00
parent eb39a88e78
commit 763ce5a036

View file

@ -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
{