Skip to content

Commit

Permalink
Fixed Media.cs deserializing problem
Browse files Browse the repository at this point in the history
  • Loading branch information
yairp03 committed May 6, 2023
1 parent 20f6c57 commit 685eedc
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions SdarotAPI/Models/Media.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

public class Media
{
[JsonPropertyName("VID")] public string Id { get; set; } = string.Empty;
[JsonPropertyName("Watch")] public Dictionary<int, string> ResolutionsLinks { get; } = new();
[JsonIgnore] public string MaxResolutionLink => ResolutionsLinks[ResolutionsLinks.Max(resolution => resolution.Key)];
[JsonPropertyName("VID")] public string Id { get; init; } = string.Empty;
[JsonPropertyName("watch")] public Dictionary<int, string> ResolutionsLinks { get; init; } = new();

[JsonIgnore]
public string MaxResolutionLink => ResolutionsLinks[ResolutionsLinks.Max(resolution => resolution.Key)];
}

0 comments on commit 685eedc

Please sign in to comment.