Fixed: Filtering editions by language

This commit is contained in:
ta264 2021-10-14 21:53:41 +01:00
parent ca8f768f84
commit 78d073a0a8
2 changed files with 2 additions and 2 deletions

View file

@ -181,7 +181,7 @@ private List<Edition> FilterEditions(IEnumerable<Edition> editions, List<Edition
var localHash = new HashSet<string>(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");

View file

@ -12,7 +12,7 @@ public MetadataProfileResource GetAll()
{
var profile = new MetadataProfile
{
AllowedLanguages = "eng, en-US, en-GB"
AllowedLanguages = "eng"
};
return profile.ToResource();