public static BeatmapSet FromBeatmapSetInfo(BeatmapSetInfo info) { if (info?.Beatmaps == null) { return(null); } var beatmapSet = new BeatmapSet { SetId = info.OnlineBeatmapSetID ?? -1, RankedStatus = info.Status, ApprovedDate = info.OnlineInfo.Ranked?.DateTime, LastUpdate = info.OnlineInfo.LastUpdated?.DateTime, LastChecked = DateTime.Now, Artist = info.Metadata.Artist, Title = info.Metadata.Title, Creator = info.Metadata.Author.Username, Source = info.Metadata.Source, Tags = info.Metadata.Tags, HasVideo = info.OnlineInfo.HasVideo, ChildrenBeatmaps = new List <ChildrenBeatmap>(), Genre = (Genre)(info.OnlineInfo.Genre.Id ?? (int)Genre.Any), Language = (Language)info.OnlineInfo.Language.Id, Disabled = info.OnlineInfo.Availability.DownloadDisabled }; foreach (var map in info.Beatmaps) { beatmapSet.ChildrenBeatmaps.Add(ChildrenBeatmap.FromBeatmapInfo(map, info.OnlineInfo, beatmapSet)); } return(beatmapSet); }