feat(readarr): toggle Readarr author monitoring and expose the command on the CLI

This commit is contained in:
Dark-Alex-17 committed 2026-08-27 10:09:04 -06:00
1 parent ac8a11233f
commit f896b65fd9
6 files changed
+221 -2

No files matched your search

+18
View File
@@ -70,6 +70,17 @@ pub enum ReadarrCommand {
)]
task_name: ReadarrTaskName,
},
#[command(
about = "Toggle monitoring for the specified author corresponding to the given author ID"
)]
ToggleAuthorMonitoring {
#[arg(
long,
help = "The Readarr ID of the author to toggle monitoring on",
required = true
)]
author_id: i64,
},
}
impl From<ReadarrCommand> for Command {
@@ -138,6 +149,13 @@ impl<'a, 'b> CliCommandHandler<'a, 'b, ReadarrCommand> for ReadarrCliHandler<'a,
.await?;
serde_json::to_string_pretty(&resp)?
}
ReadarrCommand::ToggleAuthorMonitoring { author_id } => {
let resp = self
.network
.handle_network_event(ReadarrEvent::ToggleAuthorMonitoring(author_id).into())
.await?;
serde_json::to_string_pretty(&resp)?
}
};
Ok(result)