mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 12:33:01 +08:00
Update to match api
This commit is contained in:
parent
3347ee8170
commit
d303083179
@ -176,8 +176,8 @@ namespace osu.Game.Tests.Visual.Online
|
||||
HasVideo = true,
|
||||
HasStoryboard = true,
|
||||
Covers = new BeatmapSetOnlineCovers(),
|
||||
Language = BeatmapSetOnlineLanguage.English,
|
||||
Genre = BeatmapSetOnlineGenre.Rock,
|
||||
Language = new BeatmapSetOnlineLanguage { Id = 3, Name = "English" },
|
||||
Genre = new BeatmapSetOnlineGenre { Id = 4, Name = "Rock" },
|
||||
},
|
||||
Metrics = new BeatmapSetMetrics { Ratings = Enumerable.Range(0, 11).ToArray() },
|
||||
Beatmaps = new List<BeatmapInfo>
|
||||
|
@ -88,55 +88,16 @@ namespace osu.Game.Beatmaps
|
||||
public BeatmapSetOnlineLanguage Language { get; set; }
|
||||
}
|
||||
|
||||
public enum BeatmapSetOnlineGenre
|
||||
public class BeatmapSetOnlineGenre
|
||||
{
|
||||
[Description("Any")]
|
||||
Any = 0,
|
||||
|
||||
[Description("Unspecified")]
|
||||
Unspecified = 1,
|
||||
|
||||
[Description("Video Game")]
|
||||
VideoGame = 2,
|
||||
|
||||
[Description("Anime")]
|
||||
Anime = 3,
|
||||
|
||||
[Description("Rock")]
|
||||
Rock = 4,
|
||||
|
||||
[Description("Pop")]
|
||||
Pop = 5,
|
||||
|
||||
[Description("Other")]
|
||||
Other = 6,
|
||||
|
||||
[Description("Novelty")]
|
||||
Novelty = 7,
|
||||
|
||||
// genre_id 8 doesn't exist
|
||||
|
||||
[Description("Hip-Hop")]
|
||||
HipHop = 9,
|
||||
|
||||
[Description("Electronic")]
|
||||
Electronic = 10
|
||||
public int Id { get; set; }
|
||||
public string Name { get; set; }
|
||||
}
|
||||
|
||||
public enum BeatmapSetOnlineLanguage
|
||||
public class BeatmapSetOnlineLanguage
|
||||
{
|
||||
Any,
|
||||
Other,
|
||||
English,
|
||||
Japanese,
|
||||
Chinese,
|
||||
Instrumental,
|
||||
Korean,
|
||||
French,
|
||||
German,
|
||||
Swedish,
|
||||
Spanish,
|
||||
Italian
|
||||
public int Id { get; set; }
|
||||
public string Name { get; set; }
|
||||
}
|
||||
|
||||
public class BeatmapSetOnlineCovers
|
||||
|
@ -69,10 +69,10 @@ namespace osu.Game.Online.API.Requests.Responses
|
||||
[JsonProperty(@"availability")]
|
||||
private BeatmapSetOnlineAvailability availability { get; set; }
|
||||
|
||||
[JsonProperty(@"genre_id")]
|
||||
[JsonProperty(@"genre")]
|
||||
private BeatmapSetOnlineGenre genre { get; set; }
|
||||
|
||||
[JsonProperty(@"language_id")]
|
||||
[JsonProperty(@"language")]
|
||||
private BeatmapSetOnlineLanguage language { get; set; }
|
||||
|
||||
[JsonProperty(@"beatmaps")]
|
||||
|
@ -133,8 +133,8 @@ namespace osu.Game.Overlays.BeatmapSet
|
||||
{
|
||||
source.Text = b.NewValue?.Metadata.Source ?? string.Empty;
|
||||
tags.Text = b.NewValue?.Metadata.Tags ?? string.Empty;
|
||||
genre.Text = (b.NewValue?.OnlineInfo.Genre ?? BeatmapSetOnlineGenre.Unspecified).GetDescription();
|
||||
language.Text = (b.NewValue?.OnlineInfo.Language ?? BeatmapSetOnlineLanguage.Other).ToString();
|
||||
genre.Text = b.NewValue?.OnlineInfo.Genre.Name ?? "Unspecified";
|
||||
language.Text = b.NewValue?.OnlineInfo.Language.Name ?? "Other";
|
||||
};
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user