Обнновлено до .net10
This commit is contained in:
@@ -1,12 +1,11 @@
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace YandexMusic.API.Models.Playlist
|
||||
namespace YandexMusic.API.Models.Playlist;
|
||||
|
||||
public enum YArtistPlaylistType
|
||||
{
|
||||
public enum YArtistPlaylistType
|
||||
{
|
||||
[EnumMember(Value = "TOP")]
|
||||
Top,
|
||||
[EnumMember(Value = "SIMILAR")]
|
||||
Similar
|
||||
}
|
||||
[EnumMember(Value = "TOP")]
|
||||
Top,
|
||||
[EnumMember(Value = "SIMILAR")]
|
||||
Similar,
|
||||
}
|
||||
@@ -1,42 +1,41 @@
|
||||
namespace YandexMusic.API.Models.Playlist
|
||||
namespace YandexMusic.API.Models.Playlist;
|
||||
|
||||
public enum YGeneratedPlaylistType
|
||||
{
|
||||
public enum YGeneratedPlaylistType
|
||||
{
|
||||
None,
|
||||
None,
|
||||
|
||||
/// <summary>
|
||||
/// Редакторский список
|
||||
/// </summary>
|
||||
Editorial,
|
||||
/// <summary>
|
||||
/// Редакторский список
|
||||
/// </summary>
|
||||
Editorial,
|
||||
|
||||
/// <summary>
|
||||
/// Плейлист дня
|
||||
/// </summary>
|
||||
PlaylistOfTheDay,
|
||||
/// <summary>
|
||||
/// Плейлист дня
|
||||
/// </summary>
|
||||
PlaylistOfTheDay,
|
||||
|
||||
/// <summary>
|
||||
/// Премьера
|
||||
/// </summary>
|
||||
RecentTracks,
|
||||
/// <summary>
|
||||
/// Премьера
|
||||
/// </summary>
|
||||
RecentTracks,
|
||||
|
||||
/// <summary>
|
||||
/// Дежавю
|
||||
/// </summary>
|
||||
NeverHeard,
|
||||
/// <summary>
|
||||
/// Дежавю
|
||||
/// </summary>
|
||||
NeverHeard,
|
||||
|
||||
/// <summary>
|
||||
/// Тайник
|
||||
/// </summary>
|
||||
MissedLikes,
|
||||
/// <summary>
|
||||
/// Тайник
|
||||
/// </summary>
|
||||
MissedLikes,
|
||||
|
||||
/// <summary>
|
||||
/// Алиса
|
||||
/// </summary>
|
||||
Origin,
|
||||
/// <summary>
|
||||
/// Алиса
|
||||
/// </summary>
|
||||
Origin,
|
||||
|
||||
/// <summary>
|
||||
/// Кинопоиск
|
||||
/// </summary>
|
||||
Kinopoisk
|
||||
}
|
||||
/// <summary>
|
||||
/// Кинопоиск
|
||||
/// </summary>
|
||||
Kinopoisk,
|
||||
}
|
||||
@@ -1,82 +1,75 @@
|
||||
using System.Text.Json.Serialization;
|
||||
using YandexMusic.API.Models.Common;
|
||||
using YandexMusic.API.Models.Common.Cover;
|
||||
using YandexMusic.API.Models.Track;
|
||||
|
||||
namespace YandexMusic.API.Models.Playlist
|
||||
namespace YandexMusic.API.Models.Playlist;
|
||||
|
||||
public class YPlaylist : YBaseModel
|
||||
{
|
||||
public class YPlaylist : YBaseModel
|
||||
|
||||
public YPlaylistUidPair GetKey()
|
||||
{
|
||||
#region Поля
|
||||
|
||||
public YPlaylistUidPair GetKey()
|
||||
return new YPlaylistUidPair
|
||||
{
|
||||
return new YPlaylistUidPair
|
||||
{
|
||||
Uid = Owner.Uid,
|
||||
Kind = Kind
|
||||
};
|
||||
}
|
||||
|
||||
#endregion Поля
|
||||
|
||||
#region Свойства
|
||||
|
||||
public YButton ActionButton { get; set; }
|
||||
public string AnimatedCoverUri { get; set; }
|
||||
public bool Available { get; set; }
|
||||
public YArtistPlaylistType ArtistPlaylistType { get; set; }
|
||||
public string BackgroundColor { get; set; }
|
||||
public string BackgroundImageUrl { get; set; }
|
||||
public string BackgroundVideoUrl { get; set; }
|
||||
public bool Collective { get; set; }
|
||||
[JsonConverter(typeof(YCoverConverter))]
|
||||
public YCover Cover { get; set; }
|
||||
[JsonConverter(typeof(YCoverConverter))]
|
||||
public YCover CoverWithoutText { get; set; }
|
||||
public YCustomWave CustomWave { get; set; }
|
||||
public List<YId> RecentTracks { get; set; }
|
||||
public DateTime Created { get; set; }
|
||||
public YDerivedColors DerivedColors { get; set; }
|
||||
public string Description { get; set; }
|
||||
public string DescriptionFormatted { get; set; }
|
||||
public bool DoNotIndex { get; set; }
|
||||
public long DurationMs { get; set; }
|
||||
public bool EverPlayed { get; set; }
|
||||
public string GeneratedPlaylistType { get; set; }
|
||||
public bool HasTrailer { get; set; }
|
||||
public string IdForFrom { get; set; }
|
||||
public string Image { get; set; }
|
||||
public bool IsBanner { get; set; }
|
||||
public bool IsPremiere { get; set; }
|
||||
public string Kind { get; set; }
|
||||
public List<YPlaylist> LastOwnerPlaylists { get; set; }
|
||||
public int LikesCount { get; set; }
|
||||
public YPlaylistMadeFor MadeFor { get; set; }
|
||||
public string MetrikaId { get; set; }
|
||||
public string Modified { get; set; }
|
||||
public string OgImage { get; set; }
|
||||
public string OgTitle { get; set; }
|
||||
public string OgDescription { get; set; }
|
||||
public YOwner Owner { get; set; }
|
||||
public YPager Pager { get; set; }
|
||||
public decimal PersonalColor { get; set; }
|
||||
public YPlaylistPlayCounter PlayCounter { get; set; }
|
||||
public string PlaylistUuid { get; set; }
|
||||
public List<YPrerolls> Prerolls { get; set; }
|
||||
public int Revision { get; set; }
|
||||
public List<YPlaylist> SimilarPlaylists { get; set; }
|
||||
public int Snapshot { get; set; }
|
||||
public List<YTag> Tags { get; set; }
|
||||
public string TextColor { get; set; }
|
||||
public string Title { get; set; }
|
||||
public int TrackCount { get; set; }
|
||||
public List<string> TrackIds { get; set; }
|
||||
public List<YTrackContainer> Tracks { get; set; }
|
||||
public YTrailer Trailer { get; set; }
|
||||
public string Uid { get; set; }
|
||||
public string UrlPart { get; set; }
|
||||
public string Visibility { get; set; }
|
||||
|
||||
#endregion Свойства
|
||||
Uid = Owner.Uid,
|
||||
Kind = Kind
|
||||
};
|
||||
}
|
||||
|
||||
public YButton ActionButton { get; set; }
|
||||
public string AnimatedCoverUri { get; set; }
|
||||
public bool Available { get; set; }
|
||||
public YArtistPlaylistType ArtistPlaylistType { get; set; }
|
||||
public string BackgroundColor { get; set; }
|
||||
public string BackgroundImageUrl { get; set; }
|
||||
public string BackgroundVideoUrl { get; set; }
|
||||
public bool Collective { get; set; }
|
||||
[JsonConverter(typeof(YCoverConverter))]
|
||||
public YCover Cover { get; set; }
|
||||
[JsonConverter(typeof(YCoverConverter))]
|
||||
public YCover CoverWithoutText { get; set; }
|
||||
public YCustomWave CustomWave { get; set; }
|
||||
public List<YId> RecentTracks { get; set; }
|
||||
public DateTime Created { get; set; }
|
||||
public YDerivedColors DerivedColors { get; set; }
|
||||
public string Description { get; set; }
|
||||
public string DescriptionFormatted { get; set; }
|
||||
public bool DoNotIndex { get; set; }
|
||||
public long DurationMs { get; set; }
|
||||
public bool EverPlayed { get; set; }
|
||||
public string GeneratedPlaylistType { get; set; }
|
||||
public bool HasTrailer { get; set; }
|
||||
public string IdForFrom { get; set; }
|
||||
public string Image { get; set; }
|
||||
public bool IsBanner { get; set; }
|
||||
public bool IsPremiere { get; set; }
|
||||
public string Kind { get; set; }
|
||||
public List<YPlaylist> LastOwnerPlaylists { get; set; }
|
||||
public int LikesCount { get; set; }
|
||||
public YPlaylistMadeFor MadeFor { get; set; }
|
||||
public string MetrikaId { get; set; }
|
||||
public string Modified { get; set; }
|
||||
public string OgImage { get; set; }
|
||||
public string OgTitle { get; set; }
|
||||
public string OgDescription { get; set; }
|
||||
public YOwner Owner { get; set; }
|
||||
public YPager Pager { get; set; }
|
||||
public decimal PersonalColor { get; set; }
|
||||
public YPlaylistPlayCounter PlayCounter { get; set; }
|
||||
public string PlaylistUuid { get; set; }
|
||||
public List<YPrerolls> Prerolls { get; set; }
|
||||
public int Revision { get; set; }
|
||||
public List<YPlaylist> SimilarPlaylists { get; set; }
|
||||
public int Snapshot { get; set; }
|
||||
public List<YTag> Tags { get; set; }
|
||||
public string TextColor { get; set; }
|
||||
public string Title { get; set; }
|
||||
public int TrackCount { get; set; }
|
||||
public List<string> TrackIds { get; set; }
|
||||
public List<YTrackContainer> Tracks { get; set; }
|
||||
public YTrailer Trailer { get; set; }
|
||||
public string Uid { get; set; }
|
||||
public string UrlPart { get; set; }
|
||||
public string Visibility { get; set; }
|
||||
}
|
||||
@@ -1,14 +1,14 @@
|
||||
using System.Text.Json.Serialization;
|
||||
using YandexMusic.API.Models.Track;
|
||||
|
||||
namespace YandexMusic.API.Models.Playlist
|
||||
namespace YandexMusic.API.Models.Playlist;
|
||||
|
||||
public class YPlaylistChange
|
||||
{
|
||||
public class YPlaylistChange
|
||||
{
|
||||
public int? At { get; set; }
|
||||
public int? From { get; set; }
|
||||
[JsonProperty("op")]
|
||||
public YPlaylistChangeType Operation { get; set; }
|
||||
public int? To { get; set; }
|
||||
public IEnumerable<YTrackAlbumPair> Tracks { get; set; }
|
||||
}
|
||||
public int? At { get; set; }
|
||||
public int? From { get; set; }
|
||||
[JsonPropertyName("op")]
|
||||
public YPlaylistChangeType Operation { get; set; }
|
||||
public int? To { get; set; }
|
||||
public IEnumerable<YTrackAlbumPair> Tracks { get; set; }
|
||||
}
|
||||
@@ -1,8 +1,7 @@
|
||||
namespace YandexMusic.API.Models.Playlist
|
||||
namespace YandexMusic.API.Models.Playlist;
|
||||
|
||||
public enum YPlaylistChangeType
|
||||
{
|
||||
public enum YPlaylistChangeType
|
||||
{
|
||||
Insert,
|
||||
Delete
|
||||
}
|
||||
Insert,
|
||||
Delete
|
||||
}
|
||||
@@ -1,28 +1,19 @@
|
||||
using YandexMusic.API.Models.Common;
|
||||
|
||||
namespace YandexMusic.API.Models.Playlist
|
||||
namespace YandexMusic.API.Models.Playlist;
|
||||
|
||||
public class YPlaylistMadeFor
|
||||
{
|
||||
public class YPlaylistMadeFor
|
||||
public class YMadeForCaseForms
|
||||
{
|
||||
public class YMadeForCaseForms
|
||||
{
|
||||
#region Свойства
|
||||
|
||||
public string Accusative { get; set; }
|
||||
public string Dative { get; set; }
|
||||
public string Genitive { get; set; }
|
||||
public string Instrumental { get; set; }
|
||||
public string Nominative { get; set; }
|
||||
public string Prepositional { get; set; }
|
||||
|
||||
#endregion Свойства
|
||||
}
|
||||
|
||||
#region Свойства
|
||||
|
||||
public YMadeForCaseForms CaseForms { get; set; }
|
||||
public YOwner UserInfo { get; set; }
|
||||
|
||||
#endregion Свойства
|
||||
public string Accusative { get; set; }
|
||||
public string Dative { get; set; }
|
||||
public string Genitive { get; set; }
|
||||
public string Instrumental { get; set; }
|
||||
public string Nominative { get; set; }
|
||||
public string Prepositional { get; set; }
|
||||
}
|
||||
|
||||
public YMadeForCaseForms CaseForms { get; set; }
|
||||
public YOwner UserInfo { get; set; }
|
||||
}
|
||||
@@ -1,10 +1,9 @@
|
||||
namespace YandexMusic.API.Models.Playlist
|
||||
namespace YandexMusic.API.Models.Playlist;
|
||||
|
||||
public class YPlaylistPlayCounter
|
||||
{
|
||||
public class YPlaylistPlayCounter
|
||||
{
|
||||
public string Description { get; set; }
|
||||
public string DescriptionNext { get; set; }
|
||||
public bool Updated { get; set; }
|
||||
public int? Value { get; set; }
|
||||
}
|
||||
public string Description { get; set; }
|
||||
public string DescriptionNext { get; set; }
|
||||
public bool Updated { get; set; }
|
||||
public int? Value { get; set; }
|
||||
}
|
||||
@@ -1,13 +1,12 @@
|
||||
namespace YandexMusic.API.Models.Playlist
|
||||
{
|
||||
public class YPlaylistUidPair
|
||||
{
|
||||
public string Kind { get; set; }
|
||||
public string Uid { get; set; }
|
||||
namespace YandexMusic.API.Models.Playlist;
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return $"{Uid}:{Kind}";
|
||||
}
|
||||
public class YPlaylistUidPair
|
||||
{
|
||||
public string Kind { get; set; }
|
||||
public string Uid { get; set; }
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return $"{Uid}:{Kind}";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user