Added a global language flag that now applies to the search by default

This commit is contained in:
tidusjar 2019-01-04 21:24:07 +00:00
parent 9cc9bf7e78
commit 947dbe1b6a
17 changed files with 196 additions and 134 deletions

View file

@ -157,6 +157,24 @@ namespace Ombi.Core.Engine
}
}
private string defaultLangCode;
protected async Task<string> DefaultLanguageCode(string currentCode)
{
if (currentCode.HasValue())
{
return currentCode;
}
var s = await GetOmbiSettings();
return s.DefaultLanguageCode;
}
private OmbiSettings ombiSettings;
protected async Task<OmbiSettings> GetOmbiSettings()
{
return ombiSettings ?? (ombiSettings = await OmbiSettings.GetSettingsAsync());
}
public class HideResult
{
public bool Hide { get; set; }