mirror of
https://github.com/ppy/osu.git
synced 2025-01-15 15:12:57 +08:00
Convert length retrieved from online to milliseconds
This commit is contained in:
parent
1485c273ab
commit
e73f22eff8
@ -180,7 +180,7 @@ namespace osu.Game.Tournament.Components
|
|||||||
|
|
||||||
panelContents.Children = new Drawable[]
|
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,
|
Anchor = Anchor.CentreLeft,
|
||||||
Origin = Anchor.BottomLeft,
|
Origin = Anchor.BottomLeft,
|
||||||
|
@ -41,7 +41,7 @@ namespace osu.Game.Beatmaps
|
|||||||
public double MaxStarDifficulty => Beatmaps?.Max(b => b.StarDifficulty) ?? 0;
|
public double MaxStarDifficulty => Beatmaps?.Max(b => b.StarDifficulty) ?? 0;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The maximum playable length of all beatmaps in this set.
|
/// The maximum playable length in milliseconds of all beatmaps in this set.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public double MaxLength => Beatmaps?.Max(b => b.Length) ?? 0;
|
public double MaxLength => Beatmaps?.Max(b => b.Length) ?? 0;
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
// 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.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
|
using System;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
using osu.Game.Rulesets;
|
using osu.Game.Rulesets;
|
||||||
@ -71,7 +72,7 @@ namespace osu.Game.Online.API.Requests.Responses
|
|||||||
StarDifficulty = starDifficulty,
|
StarDifficulty = starDifficulty,
|
||||||
OnlineBeatmapID = OnlineBeatmapID,
|
OnlineBeatmapID = OnlineBeatmapID,
|
||||||
Version = version,
|
Version = version,
|
||||||
Length = length,
|
Length = TimeSpan.FromSeconds(length).Milliseconds,
|
||||||
Status = Status,
|
Status = Status,
|
||||||
BeatmapSet = set,
|
BeatmapSet = set,
|
||||||
Metrics = metrics,
|
Metrics = metrics,
|
||||||
|
Loading…
Reference in New Issue
Block a user