Add missing genres and languages

This commit is contained in:
Natsu Kagami 2020-06-28 13:40:00 -04:00
parent 03c3281029
commit bc9e45969a
Signed by: nki
GPG key ID: 73376E117CD20735
2 changed files with 10 additions and 0 deletions

View file

@ -132,7 +132,10 @@ pub enum Genre {
Novelty, Novelty,
HipHop, HipHop,
Electronic, Electronic,
Metal,
Classical,
Folk, Folk,
Jazz,
} }
impl fmt::Display for Genre { impl fmt::Display for Genre {
@ -160,6 +163,8 @@ pub enum Language {
Swedish, Swedish,
Spanish, Spanish,
Italian, Italian,
Russian,
Polish,
} }
impl fmt::Display for Language { impl fmt::Display for Language {

View file

@ -195,6 +195,8 @@ fn parse_language(s: impl AsRef<str>) -> ParseResult<Language> {
9 => Swedish, 9 => Swedish,
10 => Spanish, 10 => Spanish,
11 => Italian, 11 => Italian,
12 => Russian,
13 => Polish,
_ => { _ => {
return Err(ParseError::InvalidValue { return Err(ParseError::InvalidValue {
field: "language", field: "language",
@ -218,7 +220,10 @@ fn parse_genre(s: impl AsRef<str>) -> ParseResult<Genre> {
7 => Novelty, 7 => Novelty,
9 => HipHop, 9 => HipHop,
10 => Electronic, 10 => Electronic,
11 => Metal,
12 => Classical,
13 => Folk, 13 => Folk,
14 => Jazz,
_ => { _ => {
return Err(ParseError::InvalidValue { return Err(ParseError::InvalidValue {
field: "genre", field: "genre",