feat(readarr): fetch the shared indexer settings and expose them on the CLI

The fetched settings are only written into app state when nothing is
already held there, so a refresh landing while the user has the settings
prompt open cannot overwrite edits in progress.

The fixtures give every field a distinct value. Settings whose fields
all share one value cannot detect two of them being mapped to each
other's keys.
This commit is contained in:
Dark-Alex-17 committed 2026-09-02 13:52:26 -06:00
1 parent cd5ef8e093
commit 0867ae918e
7 files changed
+177 -4

No files matched your search

+9
View File
@@ -18,6 +18,8 @@ mod get_command_handler_tests;
#[derive(Debug, Clone, PartialEq, Eq, Subcommand)]
pub enum ReadarrGetCommand {
#[command(about = "Get the shared settings for all indexers")]
AllIndexerSettings,
#[command(about = "Get detailed information for the author with the given ID")]
AuthorDetails {
#[arg(
@@ -71,6 +73,13 @@ impl<'a, 'b> CliCommandHandler<'a, 'b, ReadarrGetCommand> for ReadarrGetCommandH
async fn handle(self) -> Result<String> {
let result = match self.command {
ReadarrGetCommand::AllIndexerSettings => {
let resp = self
.network
.handle_network_event(ReadarrEvent::GetAllIndexerSettings.into())
.await?;
serde_json::to_string_pretty(&resp)?
}
ReadarrGetCommand::AuthorDetails { author_id } => {
let resp = self
.network