mirror of
https://github.com/natsukagami/youmubot.git
synced 2025-04-19 16:58:55 +00:00
Add missing genres and languages
This commit is contained in:
parent
03c3281029
commit
bc9e45969a
2 changed files with 10 additions and 0 deletions
|
@ -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 {
|
||||||
|
|
|
@ -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",
|
||||||
|
|
Loading…
Add table
Reference in a new issue