feat(readarr): fetch Readarr updates and expose them on the CLI
Adds ReadarrEvent::GetUpdates backed by get_readarr_updates, rendering the update history into the Readarr updates view, and surfaces it as 'readarr list updates'. Covers the case where an update record omits the changes key, which the live instance returns for its most recent release.
This commit is contained in:
6 files changed
+225
-3
No files matched your search
@@ -17,6 +17,7 @@ pub enum ReadarrEvent {
|
||||
GetHostConfig,
|
||||
GetSecurityConfig,
|
||||
GetStatus,
|
||||
GetUpdates,
|
||||
HealthCheck,
|
||||
}
|
||||
|
||||
@@ -27,6 +28,7 @@ impl NetworkResource for ReadarrEvent {
|
||||
ReadarrEvent::GetDiskSpace => "/diskspace",
|
||||
ReadarrEvent::HealthCheck => "/health",
|
||||
ReadarrEvent::GetStatus => "/system/status",
|
||||
ReadarrEvent::GetUpdates => "/update",
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -56,6 +58,7 @@ impl Network<'_, '_> {
|
||||
.await
|
||||
.map(ReadarrSerdeable::from),
|
||||
ReadarrEvent::GetStatus => self.get_readarr_status().await.map(ReadarrSerdeable::from),
|
||||
ReadarrEvent::GetUpdates => self.get_readarr_updates().await.map(ReadarrSerdeable::from),
|
||||
ReadarrEvent::HealthCheck => self
|
||||
.get_readarr_healthcheck()
|
||||
.await
|
||||
|
||||
Reference in new issue
Block a user