Add FindByName to IsoLanguage

This commit is contained in:
Mark McDowall 2023-05-20 16:24:31 -07:00
parent 4fe79e9a4e
commit 7238100145
1 changed files with 6 additions and 0 deletions

View File

@ -1,3 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using NzbDrone.Core.Languages;
@ -107,5 +108,10 @@ namespace NzbDrone.Core.Parser
{
return All.FirstOrDefault(l => l.Language == language);
}
public static IsoLanguage FindByName(string name)
{
return All.FirstOrDefault(l => l.Language.Name.Equals(name, StringComparison.InvariantCultureIgnoreCase));
}
}
}