feat(cli): Support for testing all Sonarr indexers at once
This commit is contained in:
@@ -97,6 +97,8 @@ pub enum SonarrCommand {
|
||||
#[arg(long, help = "The ID of the indexer to test", required = true)]
|
||||
indexer_id: i64,
|
||||
},
|
||||
#[command(about = "Test all Radarr indexers")]
|
||||
TestAllIndexers,
|
||||
}
|
||||
|
||||
impl From<SonarrCommand> for Command {
|
||||
@@ -199,6 +201,14 @@ impl<'a, 'b> CliCommandHandler<'a, 'b, SonarrCommand> for SonarrCliHandler<'a, '
|
||||
.await?;
|
||||
serde_json::to_string_pretty(&resp)?
|
||||
}
|
||||
SonarrCommand::TestAllIndexers => {
|
||||
println!("Testing all Sonarr indexers. This may take a minute...");
|
||||
let resp = self
|
||||
.network
|
||||
.handle_network_event(SonarrEvent::TestAllIndexers.into())
|
||||
.await?;
|
||||
serde_json::to_string_pretty(&resp)?
|
||||
}
|
||||
};
|
||||
|
||||
Ok(result)
|
||||
|
||||
Reference in New Issue
Block a user