Merge branch 'master' into move-online-beatmap-metrics

This commit is contained in:
Bartłomiej Dach 2021-10-25 20:33:49 +02:00 committed by GitHub
commit a49a1f41cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 3 deletions

View File

@ -8,7 +8,6 @@
using osu.Framework.Testing;
using osu.Framework.Utils;
using osu.Game.Beatmaps;
using osu.Game.Online.API.Requests.Responses;
using osu.Game.Rulesets;
using osu.Game.Tests.Visual;
using osu.Game.Tournament.IO;

View File

@ -54,7 +54,7 @@ public class APIBeatmap : IBeatmapInfo, IBeatmapOnlineInfo
[JsonProperty(@"accuracy")]
private float overallDifficulty { get; set; }
public double Length => lengthInSeconds * 1000;
public double Length => TimeSpan.FromSeconds(lengthInSeconds).TotalMilliseconds;
[JsonProperty(@"total_length")]
private double lengthInSeconds { get; set; }
@ -88,7 +88,7 @@ public virtual BeatmapInfo ToBeatmapInfo(RulesetStore rulesets)
OnlineBeatmapID = OnlineID,
Version = DifficultyName,
// 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,
MD5Hash = Checksum,
BeatmapSet = set,