Merge branch 'assets-list' into 'main'

Add an assets list command

See merge request kernald/immich-tools!14
This commit is contained in:
Marc Plano-Lesay 2024-11-05 02:42:22 +00:00
commit af5990796e
5 changed files with 109 additions and 5 deletions

View file

@ -1,10 +1,11 @@
include!(concat!(env!("OUT_DIR"), "/codegen.rs"));
use crate::args::Commands;
use args::{PeopleCommands, ServerCommands};
use args::{AssetsCommands, PeopleCommands, ServerCommands};
use clap::Parser;
use color_eyre::eyre::{Result, WrapErr};
use color_eyre::Section;
use commands::list_assets::list_assets;
use commands::missing_date_of_birth::missing_date_of_birth;
use commands::server_features::server_features;
use commands::server_version::server_version;
@ -52,6 +53,9 @@ async fn main() -> Result<()> {
validate_client_connection(&client).await?;
match &args.command {
Commands::Assets { assets_command } => match assets_command {
AssetsCommands::List { offline } => list_assets(*offline, &client).await,
},
Commands::People { people_command } => match people_command {
PeopleCommands::MissingDateOfBirths {} => missing_date_of_birth(&client).await,
PeopleCommands::SyncDateOfBirths { vcard: _ } => {