Convert length retrieved from online to milliseconds

This commit is contained in:
iiSaLMaN 2019-07-09 17:53:34 +03:00
parent 1485c273ab
commit e73f22eff8
3 changed files with 4 additions and 3 deletions

View File

@ -180,7 +180,7 @@ namespace osu.Game.Tournament.Components
panelContents.Children = new Drawable[]
{
new DiffPiece(("Length", TimeSpan.FromSeconds(length).ToString(@"mm\:ss")))
new DiffPiece(("Length", TimeSpan.FromMilliseconds(length).ToString(@"mm\:ss")))
{
Anchor = Anchor.CentreLeft,
Origin = Anchor.BottomLeft,

View File

@ -41,7 +41,7 @@ namespace osu.Game.Beatmaps
public double MaxStarDifficulty => Beatmaps?.Max(b => b.StarDifficulty) ?? 0;
/// <summary>
/// The maximum playable length of all beatmaps in this set.
/// The maximum playable length in milliseconds of all beatmaps in this set.
/// </summary>
public double MaxLength => Beatmaps?.Max(b => b.Length) ?? 0;

View File

@ -1,6 +1,7 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System;
using Newtonsoft.Json;
using osu.Game.Beatmaps;
using osu.Game.Rulesets;
@ -71,7 +72,7 @@ namespace osu.Game.Online.API.Requests.Responses
StarDifficulty = starDifficulty,
OnlineBeatmapID = OnlineBeatmapID,
Version = version,
Length = length,
Length = TimeSpan.FromSeconds(length).Milliseconds,
Status = Status,
BeatmapSet = set,
Metrics = metrics,