From 78d073a0a8d9e3edd8d66a40218db36d21dafa8f Mon Sep 17 00:00:00 2001 From: ta264 Date: Thu, 14 Oct 2021 21:53:41 +0100 Subject: [PATCH] Fixed: Filtering editions by language --- src/NzbDrone.Core/Profiles/Metadata/MetadataProfileService.cs | 2 +- .../Profiles/Metadata/MetadataProfileSchemaController.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/NzbDrone.Core/Profiles/Metadata/MetadataProfileService.cs b/src/NzbDrone.Core/Profiles/Metadata/MetadataProfileService.cs index a36af5033..f9236a088 100644 --- a/src/NzbDrone.Core/Profiles/Metadata/MetadataProfileService.cs +++ b/src/NzbDrone.Core/Profiles/Metadata/MetadataProfileService.cs @@ -181,7 +181,7 @@ namespace NzbDrone.Core.Profiles.Metadata var localHash = new HashSet(localEditions.Where(x => x.ManualAdd).Select(x => x.ForeignEditionId)); localHash.UnionWith(localFiles.Select(x => x.Edition.Value.ForeignEditionId)); - FilterByPredicate(hash, x => x.ForeignEditionId, localHash, profile, (x, p) => !allowedLanguages.Any() || allowedLanguages.Contains(x.Language?.CanonicalizeLanguage() ?? "null"), "edition language not allowed"); + FilterByPredicate(hash, x => x.ForeignEditionId, localHash, profile, (x, p) => !allowedLanguages.Any() || allowedLanguages.Contains(x.Language?.CanonicalizeLanguage()), "edition language not allowed"); FilterByPredicate(hash, x => x.ForeignEditionId, localHash, profile, (x, p) => !p.SkipMissingIsbn || x.Isbn13.IsNotNullOrWhiteSpace() || x.Asin.IsNotNullOrWhiteSpace(), "isbn and asin is missing"); FilterByPredicate(hash, x => x.ForeignEditionId, localHash, profile, (x, p) => !MatchesTerms(x.Title, p.Ignored), "contains ignored terms"); diff --git a/src/Readarr.Api.V1/Profiles/Metadata/MetadataProfileSchemaController.cs b/src/Readarr.Api.V1/Profiles/Metadata/MetadataProfileSchemaController.cs index 66f8f71d2..5e8cd34d8 100644 --- a/src/Readarr.Api.V1/Profiles/Metadata/MetadataProfileSchemaController.cs +++ b/src/Readarr.Api.V1/Profiles/Metadata/MetadataProfileSchemaController.cs @@ -12,7 +12,7 @@ namespace Readarr.Api.V1.Profiles.Metadata { var profile = new MetadataProfile { - AllowedLanguages = "eng, en-US, en-GB" + AllowedLanguages = "eng" }; return profile.ToResource();