Fixed potential issue with the RealDebrid data mapper.
This commit is contained in:
parent
eb39a88e78
commit
763ce5a036
1 changed files with 14 additions and 1 deletions
|
|
@ -224,8 +224,18 @@ namespace RdtClient.Service.Services.TorrentClients
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
if (torrent == null)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
var rdTorrent = await GetInfo(torrent.RdId);
|
var rdTorrent = await GetInfo(torrent.RdId);
|
||||||
|
|
||||||
|
if (rdTorrent == null)
|
||||||
|
{
|
||||||
|
return torrent;
|
||||||
|
}
|
||||||
|
|
||||||
if (!String.IsNullOrWhiteSpace(rdTorrent.Filename))
|
if (!String.IsNullOrWhiteSpace(rdTorrent.Filename))
|
||||||
{
|
{
|
||||||
torrent.RdName = rdTorrent.Filename;
|
torrent.RdName = rdTorrent.Filename;
|
||||||
|
|
@ -279,7 +289,10 @@ namespace RdtClient.Service.Services.TorrentClients
|
||||||
{
|
{
|
||||||
if (ex.Message == "Resource not found")
|
if (ex.Message == "Resource not found")
|
||||||
{
|
{
|
||||||
torrent.RdStatusRaw = "deleted";
|
if (torrent != null)
|
||||||
|
{
|
||||||
|
torrent.RdStatusRaw = "deleted";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue