1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-07-15 00:57:36 +02:00

Fixed: NullRefException in TorrentRssParser

From 6c494e9a92
This commit is contained in:
Qstick 2022-07-21 20:11:45 -05:00
parent f01c477b81
commit 43910af127

View File

@ -73,7 +73,7 @@ protected virtual string GetInfoHash(XElement item)
{
if (InfoHashElementName.IsNotNullOrWhiteSpace())
{
return item.FindDecendants(InfoHashElementName).FirstOrDefault().Value;
return item.FindDecendants(InfoHashElementName).FirstOrDefault()?.Value;
}
var magnetUrl = GetMagnetUrl(item);
@ -96,7 +96,7 @@ protected virtual string GetMagnetUrl(XElement item)
{
if (MagnetElementName.IsNotNullOrWhiteSpace())
{
var magnetURL = item.FindDecendants(MagnetElementName).FirstOrDefault().Value;
var magnetURL = item.FindDecendants(MagnetElementName).FirstOrDefault()?.Value;
if (magnetURL.IsNotNullOrWhiteSpace() && magnetURL.StartsWith("magnet:"))
{
return magnetURL;