feat(readarr): edit Readarr authors and expose the command on the CLI

This commit is contained in:
Dark-Alex-17 committed 2026-08-27 09:43:07 -06:00
1 parent e514e9b6cc
commit fcfc29894e
8 files changed
+1024 -6

No files matched your search

+12
View File
@@ -4,6 +4,7 @@ use add_command_handler::{ReadarrAddCommand, ReadarrAddCommandHandler};
use anyhow::Result;
use clap::Subcommand;
use delete_command_handler::{ReadarrDeleteCommand, ReadarrDeleteCommandHandler};
use edit_command_handler::{ReadarrEditCommand, ReadarrEditCommandHandler};
use get_command_handler::{ReadarrGetCommand, ReadarrGetCommandHandler};
use list_command_handler::{ReadarrListCommand, ReadarrListCommandHandler};
use tokio::sync::Mutex;
@@ -15,6 +16,7 @@ use crate::{app::App, network::NetworkTrait};
mod add_command_handler;
mod delete_command_handler;
mod edit_command_handler;
mod get_command_handler;
mod list_command_handler;
@@ -34,6 +36,11 @@ pub enum ReadarrCommand {
about = "Commands to delete resources from your Readarr instance"
)]
Delete(ReadarrDeleteCommand),
#[command(
subcommand,
about = "Commands to edit resources in your Readarr instance"
)]
Edit(ReadarrEditCommand),
#[command(
subcommand,
about = "Commands to fetch details of the resources in your Readarr instance"
@@ -102,6 +109,11 @@ impl<'a, 'b> CliCommandHandler<'a, 'b, ReadarrCommand> for ReadarrCliHandler<'a,
.handle()
.await?
}
ReadarrCommand::Edit(edit_command) => {
ReadarrEditCommandHandler::with(self.app, edit_command, self.network)
.handle()
.await?
}
ReadarrCommand::Get(get_command) => {
ReadarrGetCommandHandler::with(self.app, get_command, self.network)
.handle()