Add better language support

This commit is contained in:
Claus Vium
2019-02-12 19:50:19 +01:00
parent e970d7a6aa
commit 8029cd3ebb
9 changed files with 108 additions and 68 deletions

View File

@@ -17,6 +17,16 @@ namespace MediaBrowser.Controller.Library
/// </summary>
public static readonly string BannerUrl = TvdbBaseUrl + "banners/";
public static string NormalizeLanguage(string language)
{
if (string.IsNullOrWhiteSpace(language))
{
return null;
}
// pt-br is just pt to tvdb
return language.Split('-')[0].ToLowerInvariant();
}
/// <summary>
/// Gets the air days.
/// </summary>