From bc9e45969a8074c7d49752820baaf6055c1e23f1 Mon Sep 17 00:00:00 2001 From: Natsu Kagami Date: Sun, 28 Jun 2020 13:40:00 -0400 Subject: [PATCH] Add missing genres and languages --- youmubot-osu/src/models/mod.rs | 5 +++++ youmubot-osu/src/models/parse.rs | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/youmubot-osu/src/models/mod.rs b/youmubot-osu/src/models/mod.rs index a721408..c88dc3e 100644 --- a/youmubot-osu/src/models/mod.rs +++ b/youmubot-osu/src/models/mod.rs @@ -132,7 +132,10 @@ pub enum Genre { Novelty, HipHop, Electronic, + Metal, + Classical, Folk, + Jazz, } impl fmt::Display for Genre { @@ -160,6 +163,8 @@ pub enum Language { Swedish, Spanish, Italian, + Russian, + Polish, } impl fmt::Display for Language { diff --git a/youmubot-osu/src/models/parse.rs b/youmubot-osu/src/models/parse.rs index a270bec..23ba8c9 100644 --- a/youmubot-osu/src/models/parse.rs +++ b/youmubot-osu/src/models/parse.rs @@ -195,6 +195,8 @@ fn parse_language(s: impl AsRef) -> ParseResult { 9 => Swedish, 10 => Spanish, 11 => Italian, + 12 => Russian, + 13 => Polish, _ => { return Err(ParseError::InvalidValue { field: "language", @@ -218,7 +220,10 @@ fn parse_genre(s: impl AsRef) -> ParseResult { 7 => Novelty, 9 => HipHop, 10 => Electronic, + 11 => Metal, + 12 => Classical, 13 => Folk, + 14 => Jazz, _ => { return Err(ParseError::InvalidValue { field: "genre",