fix: fixed tidal resolve of tracks, some cleanup
Some checks failed
Deploy / update (push) Has been cancelled
Build Project .NET / build (push) Failing after 1m15s

This commit is contained in:
Pavel-Savely Savianok 2025-07-07 18:14:33 +03:00
parent 4a95ba0d86
commit 362284528c
4 changed files with 6 additions and 6 deletions

View File

@ -64,6 +64,7 @@ public class TidalService : ApiService
//TODO: придумать что-то с этим
urlQuery["countryCode"] = "US";
urlQuery["include"] = "tracks";
urlQuery["explicitFilter"] = "include";
url.Query = urlQuery.ToString();
var httpRequest = new HttpRequestMessage(HttpMethod.Get, url.Uri);

View File

@ -89,7 +89,7 @@ public class YandexService : ApiService
var artists = string.Join(", ", json!.Artists.ToList().ConvertAll(x => x.Name));
return new TrackDto(json.Track.Title, artists, json.Track.Albums[0].Title, ServiceType);
}
catch (JsonException ex)
catch (JsonException)
{
throw new TooManyRequestsException("Яндекс, похоже, считает что мы робот, что по сути является правдой. Попробуйте позже.");
}

View File

@ -36,7 +36,7 @@
]
},
"APIPaths": {
"Search": "searchresults",
"Search": "searchResults",
"GetTrack": "tracks",
"GetArtist": "artists"
}

View File

@ -83,13 +83,12 @@ public class LinkMessage : IMessage
try
{
await botClient.AnswerInlineQueryAsync(update.InlineQuery.Id,
new[]
{
[
new InlineQueryResultArticle("0", message.preview!,
new InputTextMessageContent(message.message))
}, cancellationToken: cancellationToken);
], cancellationToken: cancellationToken);
}
catch (Exception e)
catch (Exception)
{
Console.WriteLine($"Failed to send answer to {update.Message?.Chat.Username}");
}