Add a command to list albums

This commit is contained in:
Marc Plano-Lesay 2024-11-24 01:32:17 +01:00
parent af1af8dce1
commit fb78298166
Signed by: kernald
GPG key ID: 66A41B08CC62A6CF
5 changed files with 61 additions and 1 deletions

View file

@ -9,11 +9,12 @@ mod tests {
}
use crate::args::Commands;
use args::{AssetsCommands, LibrariesCommands, PeopleCommands, ServerCommands};
use args::{AlbumsCommands, AssetsCommands, LibrariesCommands, PeopleCommands, ServerCommands};
use clap::Parser;
use color_eyre::eyre::{Result, WrapErr};
use color_eyre::Section;
use commands::delete_assets::delete_assets;
use commands::list_albums::list_albums;
use commands::list_assets::list_assets;
use commands::missing_date_of_birth::missing_date_of_birth;
use commands::scan_libraries::scan_libraries;
@ -76,6 +77,9 @@ async fn main() -> Result<()> {
validate_client_connection(&ctx.client).await?;
match &args.command {
Commands::Albums { albums_command } => match albums_command {
AlbumsCommands::List {} => list_albums(ctx).await,
},
Commands::Assets { assets_command } => match assets_command {
AssetsCommands::Delete { offline } => delete_assets(ctx, *offline).await,
AssetsCommands::List { offline } => list_assets(ctx, *offline).await,