private async void LoadImage() { if (_song.Partial) { icon = Sprites.BeastSaberLogo; _callback(this); return; } var image = await _song.CoverImageBytes(); icon = Sprites.LoadSpriteRaw(image); _callback(this); }
public PreviewBeatmapStub(string levelID, Beatmap bm) { this.levelID = levelID; this.levelHash = bm.Hash; this.beatmap = bm; this.isDownloaded = false; this.songName = bm.Metadata.SongName; this.songSubName = bm.Metadata.SongSubName; this.songAuthorName = bm.Metadata.SongAuthorName; this.levelAuthorName = bm.Metadata.LevelAuthorName; this.beatsPerMinute = bm.Metadata.BPM; this.songDuration = bm.Metadata.Duration; this._downloadable = DownloadableState.True; _rawCoverTask = bm.CoverImageBytes(); }