mirror of https://github.com/ErsatzTV/ErsatzTV.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
681 B
20 lines
681 B
namespace ErsatzTV; |
|
|
|
public static class SearchHelper |
|
{ |
|
public static string ElasticSearchUri { get; private set; } |
|
public static string ElasticSearchIndexName { get; private set; } |
|
public static bool IsElasticSearchEnabled { get; private set; } |
|
|
|
public static void Init(IConfiguration configuration) |
|
{ |
|
ElasticSearchUri = configuration["ElasticSearch:Uri"]; |
|
ElasticSearchIndexName = configuration["ElasticSearch:IndexName"]; |
|
if (string.IsNullOrWhiteSpace(ElasticSearchIndexName)) |
|
{ |
|
ElasticSearchIndexName = "ersatztv"; |
|
} |
|
|
|
IsElasticSearchEnabled = !string.IsNullOrWhiteSpace(ElasticSearchUri); |
|
} |
|
}
|
|
|