From 6842c561ea36d1d2661cb87c517d6c155d65c4d3 Mon Sep 17 00:00:00 2001 From: cicomalieran <81043292+cicomalieran@users.noreply.github.com> Date: Thu, 22 Apr 2021 19:38:26 -0400 Subject: [PATCH] Fixed: Parsing RSS with null values Fixes #2187 Fixes #1730 (cherry picked from commit 8175f19442273e13517b2d507e7a4c33587f1b15) --- src/NzbDrone.Core/Indexers/RssParser.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/NzbDrone.Core/Indexers/RssParser.cs b/src/NzbDrone.Core/Indexers/RssParser.cs index 096045a7b..fd50c7de5 100644 --- a/src/NzbDrone.Core/Indexers/RssParser.cs +++ b/src/NzbDrone.Core/Indexers/RssParser.cs @@ -266,9 +266,9 @@ namespace NzbDrone.Core.Indexers { return new RssEnclosure { - Url = v.Attribute("url").Value, - Type = v.Attribute("type").Value, - Length = (long)v.Attribute("length") + Url = v.Attribute("url")?.Value, + Type = v.Attribute("type")?.Value, + Length = v.Attribute("length")?.Value?.ParseInt64() ?? 0 }; } catch (Exception e)