feat(readarr): refresh and rescan a Readarr author and expose the command on the CLI

Posts the RefreshAuthor command to the command endpoint with the author ID, queueing a metadata refresh and a disk scan for that author. The response is returned verbatim and no app state is mutated.

Adds the refresh subcommand group to the Readarr CLI.
This commit is contained in:
Dark-Alex-17 committed 2026-08-27 10:43:37 -06:00
1 parent e9b9aa3a14
commit c82006862e
7 files changed
+258 -1

No files matched your search

+7 -1
View File
@@ -50,6 +50,7 @@ pub enum ReadarrEvent {
StartTask(ReadarrTaskName),
ToggleAuthorMonitoring(i64),
TriggerAutomaticAuthorSearch(i64),
UpdateAndScanAuthor(i64),
}
impl NetworkResource for ReadarrEvent {
@@ -64,7 +65,8 @@ impl NetworkResource for ReadarrEvent {
ReadarrEvent::SearchNewAuthor(_) => "/author/lookup",
ReadarrEvent::GetQueuedEvents
| ReadarrEvent::StartTask(_)
| ReadarrEvent::TriggerAutomaticAuthorSearch(_) => "/command",
| ReadarrEvent::TriggerAutomaticAuthorSearch(_)
| ReadarrEvent::UpdateAndScanAuthor(_) => "/command",
ReadarrEvent::GetHostConfig | ReadarrEvent::GetSecurityConfig => "/config/host",
ReadarrEvent::GetDiskSpace => "/diskspace",
ReadarrEvent::HealthCheck => "/health",
@@ -176,6 +178,10 @@ impl Network<'_, '_> {
.trigger_automatic_author_search(author_id)
.await
.map(ReadarrSerdeable::from),
ReadarrEvent::UpdateAndScanAuthor(author_id) => self
.update_and_scan_author(author_id)
.await
.map(ReadarrSerdeable::from),
}
}