public static async Task <PreviewBeatmapStub> FetchPopulatedPreview(string levelId) { PreviewBeatmapStub beatmap = new PreviewBeatmapStub(levelId); if (!beatmap.isDownloaded) { await beatmap.FetchPopulated(); } else { _ = beatmap.FetchPopulated(); } CachedPreviews.Add(levelId, beatmap); return(beatmap); }
public static PreviewBeatmapStub FetchPreview(string levelId, string songName, string songSubName, string songAuthorName, string levelAuthorName) { PreviewBeatmapStub beatmap = new PreviewBeatmapStub(levelId, songName, songSubName, songAuthorName, levelAuthorName); _ = beatmap.FetchPopulated(); CachedPreviews.Add(levelId, beatmap); return(beatmap); }