mirror of
https://github.com/ppy/osu.git
synced 2025-02-14 19:12:59 +08:00
Remove fallbacks to empty APIBeatmap
on population failure
Was causing there to be two kinds of missing `TournamentBeatmap`s: one with missing `Beatmap == null`, and one with `Beatmap == new APIBeatmap()`. In particular, they would appear differently in UI (either as "unknown - unknown", or the intensely enigmatic " - ").
This commit is contained in:
parent
3c923b9e81
commit
b7ddb5c946
@ -19,7 +19,6 @@ using osu.Game.Database;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Online;
|
||||
using osu.Game.Online.API.Requests;
|
||||
using osu.Game.Online.API.Requests.Responses;
|
||||
using osu.Game.Tournament.IO;
|
||||
using osu.Game.Tournament.IPC;
|
||||
using osu.Game.Tournament.Models;
|
||||
@ -245,7 +244,9 @@ namespace osu.Game.Tournament
|
||||
{
|
||||
var b = beatmapsRequiringPopulation[i];
|
||||
|
||||
b.Beatmap = new TournamentBeatmap(await beatmapCache.GetBeatmapAsync(b.ID).ConfigureAwait(false) ?? new APIBeatmap());
|
||||
var populated = await beatmapCache.GetBeatmapAsync(b.ID).ConfigureAwait(false);
|
||||
if (populated != null)
|
||||
b.Beatmap = new TournamentBeatmap(populated);
|
||||
|
||||
updateLoadProgressMessage($"Populating round beatmaps ({i} / {beatmapsRequiringPopulation.Count})");
|
||||
}
|
||||
@ -270,7 +271,9 @@ namespace osu.Game.Tournament
|
||||
{
|
||||
var b = beatmapsRequiringPopulation[i];
|
||||
|
||||
b.Beatmap = new TournamentBeatmap(await beatmapCache.GetBeatmapAsync(b.ID).ConfigureAwait(false) ?? new APIBeatmap());
|
||||
var populated = await beatmapCache.GetBeatmapAsync(b.ID).ConfigureAwait(false);
|
||||
if (populated != null)
|
||||
b.Beatmap = new TournamentBeatmap(populated);
|
||||
|
||||
updateLoadProgressMessage($"Populating seeding beatmaps ({i} / {beatmapsRequiringPopulation.Count})");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user