Files
YandexMusic/YandexMusic.API/Extensions/API/YStationResultExtensionsAsync.cs
FrigaT 526353d679
All checks were successful
Release / pack-and-publish (release) Successful in 36s
Переделано воспроизведение аудио
2026-04-21 11:14:36 +03:00

28 lines
1.3 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
using YandexMusic.API.Models.Radio;
using YandexMusic.API.Models.Track;
namespace YandexMusic.API;
/// <summary>
/// Методы-расширения для радиостанции.
/// </summary>
public static class YStationResultExtensions
{
/// <summary>
/// Получает список треков для радиостанции.
/// </summary>
public static async Task<List<YSequenceItem>?> GetTracksAsync(this YStation station, string prevTrackId = "")
=> (await station.Context.Api.Radio.GetStationTracksAsync(station, prevTrackId))?.Sequence;
/// <summary>
/// Устанавливает настройки станции.
/// </summary>
public static async Task<string?> SetSettings2Async(this YStation station, YStationSettings2 settings)
=> await station.Context.Api.Radio.SetStationSettings2Async(station, settings);
/// <summary>
/// Отправляет обратную связь о прослушивании.
/// </summary>
public static Task<string?> SendFeedbackAsync(this YStation station, YStationFeedbackType type, YTrack? track = null, string batchId = "", double totalPlayedSeconds = 0)
=> station.Context.Api.Radio.SendStationFeedbackAsync(station, type, track, batchId, totalPlayedSeconds);
}