From d5605abd91558579226ca6ee8a7fe4ba9b6e8666 Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Sat, 20 May 2023 16:24:31 -0700 Subject: [PATCH] Add FindByName to IsoLanguage (cherry picked from commit 723810014573c4bae2b8c611144bbee1a6b56237) --- src/NzbDrone.Core/Parser/IsoLanguages.cs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/NzbDrone.Core/Parser/IsoLanguages.cs b/src/NzbDrone.Core/Parser/IsoLanguages.cs index 42d547d03..8a58de7d8 100644 --- a/src/NzbDrone.Core/Parser/IsoLanguages.cs +++ b/src/NzbDrone.Core/Parser/IsoLanguages.cs @@ -1,3 +1,4 @@ +using System; using System.Collections.Generic; using System.Linq; using NzbDrone.Core.Languages; @@ -88,14 +89,14 @@ public static IsoLanguage Find(string isoCode) return null; } - public static IsoLanguage FindByName(string name) - { - return All.FirstOrDefault(l => l.EnglishName == name.Trim()); - } - public static IsoLanguage Get(Language language) { return All.FirstOrDefault(l => l.Language == language); } + + public static IsoLanguage FindByName(string name) + { + return All.FirstOrDefault(l => l.EnglishName.Equals(name.Trim(), StringComparison.InvariantCultureIgnoreCase)); + } } }