chore: update to Maimai DX Circle
This commit is contained in:
@@ -3,7 +3,7 @@ use palc::Subcommand;
|
||||
use strum::EnumString;
|
||||
|
||||
#[derive(Parser)]
|
||||
#[command(about = "SDGB api tool", long_about = env!("CARGO_PKG_DESCRIPTION"))]
|
||||
#[command(long_about = env!("CARGO_PKG_DESCRIPTION"))]
|
||||
pub struct Cli {
|
||||
/// Try to generate machine readable format.
|
||||
///
|
||||
@@ -139,7 +139,7 @@ pub enum Commands {
|
||||
},
|
||||
}
|
||||
|
||||
#[derive(Debug, Default, EnumString)]
|
||||
#[derive(Debug, Default, EnumString, strum::Display)]
|
||||
#[strum(serialize_all = "snake_case")]
|
||||
pub enum RatingFormat {
|
||||
#[default]
|
||||
|
||||
@@ -383,20 +383,24 @@ async fn main() -> Result<(), Box<dyn snafu::Error>> {
|
||||
.rating_list
|
||||
.into_iter()
|
||||
.chain(user_rating.next_rating_list)
|
||||
.map(
|
||||
.filter_map(
|
||||
move |MusicRating {
|
||||
music_id,
|
||||
level,
|
||||
rom_version,
|
||||
achievement,
|
||||
}| {
|
||||
MusicRatingFlatten {
|
||||
let (_rank, dx_rating) =
|
||||
music_db::query_music_level(music_id, level)?
|
||||
.dx_rating(achievement);
|
||||
Some(MusicRatingFlatten {
|
||||
user_id,
|
||||
music_id,
|
||||
level,
|
||||
rom_version,
|
||||
achievement,
|
||||
}
|
||||
dx_rating,
|
||||
})
|
||||
},
|
||||
)
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user