change arg

This commit is contained in:
Quaternions 2024-04-20 14:43:02 -07:00
parent 53755caad5
commit 90aa03f86e

View File

@ -54,8 +54,8 @@ struct DownloadSubcommand{
cookie:String, cookie:String,
#[arg(long)] #[arg(long)]
output_folder:Option<PathBuf>, output_folder:Option<PathBuf>,
#[arg(long,required=true)] #[arg(required=true)]
asset_id_list:Vec<AssetID>, asset_ids:Vec<AssetID>,
} }
#[derive(Args)] #[derive(Args)]
struct UploadSubcommand{ struct UploadSubcommand{
@ -189,7 +189,7 @@ async fn main()->AResult<()>{
let output_folder=subcommand.output_folder.unwrap_or_else(||std::env::current_dir().unwrap()); let output_folder=subcommand.output_folder.unwrap_or_else(||std::env::current_dir().unwrap());
download_list( download_list(
Cookie::from_type(subcommand.cookie_type,subcommand.cookie).await?.0, Cookie::from_type(subcommand.cookie_type,subcommand.cookie).await?.0,
subcommand.asset_id_list.into_iter().map(|asset_id|{ subcommand.asset_ids.into_iter().map(|asset_id|{
let mut path=output_folder.clone(); let mut path=output_folder.clone();
path.push(asset_id.to_string()); path.push(asset_id.to_string());
(asset_id,path) (asset_id,path)