mirror of
https://github.com/osukey/osukey.git
synced 2025-08-06 16:13:57 +09:00
Allow setting of APIBeatmap.Length
(and don't serialise twice)
This commit is contained in:
@ -54,10 +54,15 @@ namespace osu.Game.Online.API.Requests.Responses
|
|||||||
[JsonProperty(@"accuracy")]
|
[JsonProperty(@"accuracy")]
|
||||||
private float overallDifficulty { get; set; }
|
private float overallDifficulty { get; set; }
|
||||||
|
|
||||||
public double Length => TimeSpan.FromSeconds(lengthInSeconds).TotalMilliseconds;
|
[JsonIgnore]
|
||||||
|
public double Length { get; set; }
|
||||||
|
|
||||||
[JsonProperty(@"total_length")]
|
[JsonProperty(@"total_length")]
|
||||||
private double lengthInSeconds { get; set; }
|
private double lengthInSeconds
|
||||||
|
{
|
||||||
|
get => TimeSpan.FromMilliseconds(Length).TotalSeconds;
|
||||||
|
set => Length = TimeSpan.FromSeconds(value).TotalMilliseconds;
|
||||||
|
}
|
||||||
|
|
||||||
[JsonProperty(@"count_circles")]
|
[JsonProperty(@"count_circles")]
|
||||||
public int CircleCount { get; set; }
|
public int CircleCount { get; set; }
|
||||||
|
Reference in New Issue
Block a user