fix: fixed search of tidal tracks using WebUtils
Some checks failed
Deploy / update (push) Has been cancelled
Build Project .NET / build (push) Has been cancelled

This commit is contained in:
Lisoveliy
2025-05-12 21:37:29 +03:00
parent fd7a274e82
commit 4a95ba0d86
10 changed files with 59 additions and 24 deletions

View File

@@ -44,13 +44,21 @@ public static class Program
private static void LoadConfig()
{
Logger.LogInformation("Loading config...");
IConfigurationRoot configuration = new ConfigurationBuilder()
.AddJsonFile("telegramconfig.json", optional: false)
#if DEBUG
.AddJsonFile("telegramconfig.local.json", true, true)
#endif
.Build();
Config = configuration.GetSection("AppSettings").Get<AppSettings>() ?? throw new NullReferenceException();
var configuration = new ConfigurationBuilder();
if (Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT") == "Development")
{
configuration.AddJsonFile("telegramconfig.local.json", false);
Logger.LogInformation("Local config loaded.");
}
else
{
configuration.AddJsonFile("telegramconfig.json", false);
}
var configurationRoot = configuration.Build();
Config = configurationRoot.GetSection("AppSettings").Get<AppSettings>() ?? throw new NullReferenceException();
}
private static CancellationTokenSource LoadBot()