feat(readarr): refresh and rescan a Readarr author and expose the command on the CLI
Posts the RefreshAuthor command to the command endpoint with the author ID, queueing a metadata refresh and a disk scan for that author. The response is returned verbatim and no app state is mutated. Adds the refresh subcommand group to the Readarr CLI.
This commit is contained in:
7 files changed
+258
-1
No files matched your search
@@ -7,6 +7,7 @@ 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 refresh_command_handler::{ReadarrRefreshCommand, ReadarrRefreshCommandHandler};
|
||||
use tokio::sync::Mutex;
|
||||
use trigger_automatic_search_command_handler::{
|
||||
ReadarrTriggerAutomaticSearchCommand, ReadarrTriggerAutomaticSearchCommandHandler,
|
||||
@@ -22,6 +23,7 @@ mod delete_command_handler;
|
||||
mod edit_command_handler;
|
||||
mod get_command_handler;
|
||||
mod list_command_handler;
|
||||
mod refresh_command_handler;
|
||||
mod trigger_automatic_search_command_handler;
|
||||
|
||||
#[cfg(test)]
|
||||
@@ -55,6 +57,11 @@ pub enum ReadarrCommand {
|
||||
about = "Commands to list attributes from your Readarr instance"
|
||||
)]
|
||||
List(ReadarrListCommand),
|
||||
#[command(
|
||||
subcommand,
|
||||
about = "Commands to refresh the data in your Readarr instance"
|
||||
)]
|
||||
Refresh(ReadarrRefreshCommand),
|
||||
#[command(
|
||||
subcommand,
|
||||
about = "Commands to trigger automatic searches for releases of different resources in your Readarr instance"
|
||||
@@ -144,6 +151,11 @@ impl<'a, 'b> CliCommandHandler<'a, 'b, ReadarrCommand> for ReadarrCliHandler<'a,
|
||||
.handle()
|
||||
.await?
|
||||
}
|
||||
ReadarrCommand::Refresh(refresh_command) => {
|
||||
ReadarrRefreshCommandHandler::with(self.app, refresh_command, self.network)
|
||||
.handle()
|
||||
.await?
|
||||
}
|
||||
ReadarrCommand::TriggerAutomaticSearch(trigger_automatic_search_command) => {
|
||||
ReadarrTriggerAutomaticSearchCommandHandler::with(
|
||||
self.app,
|
||||
|
||||
Reference in new issue
Block a user