mirror of
https://github.com/Readarr/Readarr
synced 2025-12-15 21:02:40 +01:00
Add FindByName to IsoLanguage
(cherry picked from commit 723810014573c4bae2b8c611144bbee1a6b56237) Fixes #2515
This commit is contained in:
parent
e199e40621
commit
985f0fa4a6
1 changed files with 6 additions and 5 deletions
|
|
@ -1,3 +1,4 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using NzbDrone.Core.Languages;
|
||||
|
|
@ -68,14 +69,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));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue