mirror of
https://github.com/ppy/osu.git
synced 2025-01-14 19:13:20 +08:00
Fix incorrect length when calling APIBeatmap.ToBeatmapInfo
This commit is contained in:
parent
37ec4db017
commit
b65d199f6a
@ -54,7 +54,7 @@ namespace osu.Game.Online.API.Requests.Responses
|
|||||||
[JsonProperty(@"accuracy")]
|
[JsonProperty(@"accuracy")]
|
||||||
private float overallDifficulty { get; set; }
|
private float overallDifficulty { get; set; }
|
||||||
|
|
||||||
public double Length => lengthInSeconds * 1000;
|
public double Length => TimeSpan.FromSeconds(lengthInSeconds).TotalMilliseconds;
|
||||||
|
|
||||||
[JsonProperty(@"total_length")]
|
[JsonProperty(@"total_length")]
|
||||||
private double lengthInSeconds { get; set; }
|
private double lengthInSeconds { get; set; }
|
||||||
@ -86,7 +86,7 @@ namespace osu.Game.Online.API.Requests.Responses
|
|||||||
OnlineBeatmapID = OnlineID,
|
OnlineBeatmapID = OnlineID,
|
||||||
Version = DifficultyName,
|
Version = DifficultyName,
|
||||||
// this is actually an incorrect mapping (Length is calculated as drain length in lazer's import process, see BeatmapManager.calculateLength).
|
// this is actually an incorrect mapping (Length is calculated as drain length in lazer's import process, see BeatmapManager.calculateLength).
|
||||||
Length = TimeSpan.FromSeconds(Length).TotalMilliseconds,
|
Length = Length,
|
||||||
Status = Status,
|
Status = Status,
|
||||||
MD5Hash = Checksum,
|
MD5Hash = Checksum,
|
||||||
BeatmapSet = set,
|
BeatmapSet = set,
|
||||||
|
Loading…
Reference in New Issue
Block a user