Unset album_id as mandatory in photo::add and set it as unsorted if not provided
Signed-off-by: Louis Vallat <louis@louis-vallat.xyz>
This commit is contained in:
parent
53e56f9122
commit
cf0d1e2591
@ -158,7 +158,6 @@ async fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
|
||||
SubCommand::with_name("add_photo")
|
||||
.about("Add some picture to a lychee instance.")
|
||||
.arg(Arg::with_name("album_id")
|
||||
.required(true)
|
||||
.long("album_id")
|
||||
.short("a")
|
||||
.help("The album id to add the picture to.")
|
||||
@ -224,7 +223,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
|
||||
let pass = m.value_of("password").unwrap_or("");
|
||||
set_public_album(&client, &lychee_session_cookie, i, p, v, d, s, f, n, pass).await;
|
||||
} else if let Some(m) = matches.subcommand_matches("add_photo") {
|
||||
let a = m.value_of("album_id").unwrap();
|
||||
let a = m.value_of("album_id").unwrap_or("0");
|
||||
let i = m.value_of("photo_path").unwrap();
|
||||
println!("{}", add_photo(&client, &lychee_session_cookie, a, i).await);
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user