From 7d9183ef128adddf15f6a04cd0027991e1a7e94c Mon Sep 17 00:00:00 2001 From: Qstick Date: Wed, 29 Mar 2023 19:21:35 -0500 Subject: [PATCH] Fixed: Queue error for language custom format on unknown items --- .../CustomFormats/Specifications/LanguageSpecification.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/NzbDrone.Core/CustomFormats/Specifications/LanguageSpecification.cs b/src/NzbDrone.Core/CustomFormats/Specifications/LanguageSpecification.cs index c3b0a638a..82c20f35b 100644 --- a/src/NzbDrone.Core/CustomFormats/Specifications/LanguageSpecification.cs +++ b/src/NzbDrone.Core/CustomFormats/Specifications/LanguageSpecification.cs @@ -34,9 +34,10 @@ public class LanguageSpecification : CustomFormatSpecificationBase protected override bool IsSatisfiedByWithoutNegate(CustomFormatInput input) { - var comparedLanguage = input.MovieInfo != null && Value == Language.Original.Id && input.Movie.MovieMetadata.Value.OriginalLanguage != Language.Unknown + var comparedLanguage = input.MovieInfo != null && input.Movie != null && Value == Language.Original.Id && input.Movie.MovieMetadata.Value.OriginalLanguage != Language.Unknown ? input.Movie.MovieMetadata.Value.OriginalLanguage : (Language)Value; + return input?.Languages?.Contains(comparedLanguage) ?? false; }