From fa4534dcff84981c38b79b6d9296f3fe7f0fcd07 Mon Sep 17 00:00:00 2001 From: Bogdan Date: Sun, 26 Feb 2023 22:59:48 +0200 Subject: [PATCH] Fixed: (Cardigann) Use GetValueOrDefault to prevent InvalidOperation --- .../Definitions/Cardigann/CardigannParser.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/NzbDrone.Core/Indexers/Definitions/Cardigann/CardigannParser.cs b/src/NzbDrone.Core/Indexers/Definitions/Cardigann/CardigannParser.cs index 91374487f..656240822 100644 --- a/src/NzbDrone.Core/Indexers/Definitions/Cardigann/CardigannParser.cs +++ b/src/NzbDrone.Core/Indexers/Definitions/Cardigann/CardigannParser.cs @@ -538,27 +538,27 @@ namespace NzbDrone.Core.Indexers.Cardigann break; case "imdb": case "imdbid": - release.ImdbId = (int)ParseUtil.GetLongFromString(value); + release.ImdbId = (int)ParseUtil.GetLongFromString(value).GetValueOrDefault(); value = release.ImdbId.ToString(); break; case "tmdbid": - release.TmdbId = (int)ParseUtil.GetLongFromString(value); + release.TmdbId = (int)ParseUtil.GetLongFromString(value).GetValueOrDefault(); value = release.TmdbId.ToString(); break; case "rageid": - release.TvRageId = (int)ParseUtil.GetLongFromString(value); + release.TvRageId = (int)ParseUtil.GetLongFromString(value).GetValueOrDefault(); value = release.TvRageId.ToString(); break; case "traktid": - release.TraktId = (int)ParseUtil.GetLongFromString(value); + release.TraktId = (int)ParseUtil.GetLongFromString(value).GetValueOrDefault(); value = release.TraktId.ToString(); break; case "tvdbid": - release.TvdbId = (int)ParseUtil.GetLongFromString(value); + release.TvdbId = (int)ParseUtil.GetLongFromString(value).GetValueOrDefault(); value = release.TvdbId.ToString(); break; case "doubanid": - release.DoubanId = (int)ParseUtil.GetLongFromString(value); + release.DoubanId = (int)ParseUtil.GetLongFromString(value).GetValueOrDefault(); value = release.DoubanId.ToString(); break; case "poster":