mirror of
https://github.com/Radarr/Radarr.git
synced 2024-09-11 20:12:41 +02:00
Add FindByName to IsoLanguage
(cherry picked from commit 723810014573c4bae2b8c611144bbee1a6b56237)
This commit is contained in:
parent
5ead395f9f
commit
d5605abd91
@ -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));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user