From 29f1c36f54aa11378b7eee07159a0f0a7de10be4 Mon Sep 17 00:00:00 2001 From: Bogdan Date: Fri, 13 Oct 2023 18:55:04 +0300 Subject: [PATCH] Prevent NullRef in Nebulance with null TvMazeIds --- src/NzbDrone.Core/Indexers/Definitions/Nebulance.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/NzbDrone.Core/Indexers/Definitions/Nebulance.cs b/src/NzbDrone.Core/Indexers/Definitions/Nebulance.cs index da274e75e..45810a1c2 100644 --- a/src/NzbDrone.Core/Indexers/Definitions/Nebulance.cs +++ b/src/NzbDrone.Core/Indexers/Definitions/Nebulance.cs @@ -265,7 +265,6 @@ namespace NzbDrone.Core.Indexers.Definitions Grabs = ParseUtil.CoerceInt(row.Snatch), Seeders = ParseUtil.CoerceInt(row.Seed), Peers = ParseUtil.CoerceInt(row.Seed) + ParseUtil.CoerceInt(row.Leech), - TvMazeId = ParseUtil.CoerceInt(row.TvMazeId), Scene = row.Tags?.ContainsIgnoreCase("scene"), MinimumRatio = 0, // ratioless MinimumSeedTime = row.Category.ToLower() == "season" ? 432000 : 86400, // 120 hours for seasons and 24 hours for episodes @@ -273,6 +272,11 @@ namespace NzbDrone.Core.Indexers.Definitions UploadVolumeFactor = 1 }; + if (row.TvMazeId.IsNotNullOrWhiteSpace()) + { + release.TvMazeId = ParseUtil.CoerceInt(row.TvMazeId); + } + torrentInfos.Add(release); }