обновление json parse
All checks were successful
Release / pack-and-publish (release) Successful in 45s

This commit is contained in:
FrigaT
2026-04-13 13:55:23 +03:00
parent a40b36ef96
commit 21a0c5abe6
10 changed files with 156 additions and 8 deletions

View File

@@ -20,7 +20,7 @@ public class YCoverConverter : JsonConverter<YCover>
"from-artist-photos" or "from-album-cover" => JsonSerializer.Deserialize<YCoverImage>(root.GetRawText(), options),
"pic" => JsonSerializer.Deserialize<YCoverPic>(root.GetRawText(), options),
"mosaic" => JsonSerializer.Deserialize<YCoverMosaic>(root.GetRawText(), options),
_ => JsonSerializer.Deserialize<YCover>(root.GetRawText(), options)
_ => new YCover() { Type = YCoverType.Error }
};
}

View File

@@ -1,4 +1,3 @@
using System.Runtime.Serialization;
using System.Text.Json.Serialization;
namespace YandexMusic.API.Models.Common.Cover;
@@ -8,9 +7,7 @@ public enum YCoverType
{
Color,
Error,
[EnumMember(Value = "from-artist-photos")]
FromArtistPhotos,
[EnumMember(Value = "from-album-cover")]
FromAlbumCover,
Mosaic,
Pic,