Add helper property to access a realm beatmap's beatmap file

This commit is contained in:
Dean Herbert
2021-11-22 15:30:11 +09:00
parent ff13a98077
commit 1cdfa6d9a0
2 changed files with 21 additions and 0 deletions

View File

@ -2,6 +2,7 @@
// See the LICENCE file in the repository root for full licence text.
using System;
using System.Linq;
using JetBrains.Annotations;
using Newtonsoft.Json;
using osu.Framework.Testing;
@ -35,6 +36,8 @@ namespace osu.Game.Models
public RealmBeatmapSet? BeatmapSet { get; set; }
public RealmNamedFileUsage? File => BeatmapSet?.Files.First(f => f.File.Hash == Hash);
public BeatmapSetOnlineStatus Status
{
get => (BeatmapSetOnlineStatus)StatusInt;