mirror of
https://github.com/ppy/osu
synced 2024-12-15 03:16:17 +00:00
Allow setting of APIBeatmap.Length
(and don't serialise twice)
This commit is contained in:
parent
d19580cf60
commit
40d963fc8a
@ -54,10 +54,15 @@ namespace osu.Game.Online.API.Requests.Responses
|
||||
[JsonProperty(@"accuracy")]
|
||||
private float overallDifficulty { get; set; }
|
||||
|
||||
public double Length => TimeSpan.FromSeconds(lengthInSeconds).TotalMilliseconds;
|
||||
[JsonIgnore]
|
||||
public double Length { get; set; }
|
||||
|
||||
[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")]
|
||||
public int CircleCount { get; set; }
|
||||
|
Loading…
Reference in New Issue
Block a user