mirror of
https://github.com/natsukagami/youmubot.git
synced 2025-04-19 08:48:54 +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,
|
||||
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 {
|
||||
|
|
|
@ -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",
|
||||
|
|
Loading…
Add table
Reference in a new issue