feat(readarr): fetch the Readarr host config and expose it on the CLI

This commit is contained in:
Dark-Alex-17 committed 2026-08-20 16:07:33 -06:00
1 parent 520b422dcc
commit 1072585903
6 files changed
+123 -3

No files matched your search

+16 -1
View File
@@ -1,4 +1,4 @@
use crate::models::servarr_models::{DiskSpace, SystemStatus};
use crate::models::servarr_models::{DiskSpace, HostConfig, SystemStatus};
use crate::network::readarr_network::ReadarrEvent;
use crate::network::{Network, RequestMethod};
use anyhow::Result;
@@ -26,6 +26,21 @@ impl Network<'_, '_> {
.await
}
pub(in crate::network::readarr_network) async fn get_readarr_host_config(
&mut self,
) -> Result<HostConfig> {
info!("Fetching Readarr host config");
let event = ReadarrEvent::GetHostConfig;
let request_props = self
.request_props_from(event, RequestMethod::Get, None::<()>, None, None)
.await;
self
.handle_request::<(), HostConfig>(request_props, |_, _| ())
.await
}
pub(in crate::network::readarr_network) async fn get_readarr_status(
&mut self,
) -> Result<SystemStatus> {