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()

View File

@@ -11,7 +11,7 @@
<Version Condition=" '$(VersionSuffix)' == '' ">0.0.1.0</Version>
<Version Condition=" '$(VersionSuffix)' != '' ">$(VersionSuffix)</Version>
<Company>SpectruMTeamCode</Company>
<Authors>Lisoveliy, Sluppy(Gl3b4ty)</Authors>
<Authors>Lisoveliy</Authors>
<Copyright>Copyright © $(Company) $([System.DateTime]::UtcNow.ToString(yyyy))</Copyright>
<Product>SWAD Platform</Product>
<Description>Platform for sharing music links from one music service to another for free! (REST API Back-end)</Description>
@@ -30,14 +30,12 @@
</ItemGroup>
<ItemGroup>
<None Remove="telegramconfig.json" />
<Content Include="telegramconfig.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Update="telegramconfig.local.json">
<Content Include="telegramconfig.local.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>
</Project>

View File

@@ -1,6 +1,5 @@
{
"AppSettings": {
"Token": "INSERT TOKEN HERE",
"ApiPath": "http://api:8080",
"StartMessage": "Привет. Я бот https://swapdude.pro! Я помогу отправить твоим друзьям ссылку на песню с других сервисов! Просто пришли ссылку (Spotify, Yandex, Tidal) и я сконвертирую её в 2 других сервиса.\n(BETA)",
"Changelog": [