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,
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 {

View file

@ -195,6 +195,8 @@ fn parse_language(s: impl AsRef<str>) -> ParseResult<Language> {
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<str>) -> ParseResult<Genre> {
7 => Novelty,
9 => HipHop,
10 => Electronic,
11 => Metal,
12 => Classical,
13 => Folk,
14 => Jazz,
_ => {
return Err(ParseError::InvalidValue {
field: "genre",