feat(readarr): refresh Readarr downloads and expose the command on the CLI

This commit is contained in:
Dark-Alex-17 committed 2026-08-28 13:23:26 -06:00
1 parent 5c9fead725
commit f5bcb7d83a
6 files changed
+112 -1

No files matched your search

@@ -29,6 +29,8 @@ pub enum ReadarrRefreshCommand {
)]
author_id: i64,
},
#[command(about = "Refresh all downloads in Readarr")]
Downloads,
}
impl From<ReadarrRefreshCommand> for Command {
@@ -74,6 +76,13 @@ impl<'a, 'b> CliCommandHandler<'a, 'b, ReadarrRefreshCommand>
.await?;
serde_json::to_string_pretty(&resp)?
}
ReadarrRefreshCommand::Downloads => {
let resp = self
.network
.handle_network_event(ReadarrEvent::UpdateDownloads.into())
.await?;
serde_json::to_string_pretty(&resp)?
}
};
Ok(result)