feat(readarr): refresh all Readarr authors and expose the command on the CLI
Posts the RefreshAuthor command to the command endpoint with no author ID, which is how Readarr distinguishes a library wide refresh from a single author refresh. The response is returned verbatim and no app state is mutated.
This commit is contained in:
6 files changed
+101
No files matched your search
@@ -50,6 +50,7 @@ pub enum ReadarrEvent {
|
||||
StartTask(ReadarrTaskName),
|
||||
ToggleAuthorMonitoring(i64),
|
||||
TriggerAutomaticAuthorSearch(i64),
|
||||
UpdateAllAuthors,
|
||||
UpdateAndScanAuthor(i64),
|
||||
}
|
||||
|
||||
@@ -66,6 +67,7 @@ impl NetworkResource for ReadarrEvent {
|
||||
ReadarrEvent::GetQueuedEvents
|
||||
| ReadarrEvent::StartTask(_)
|
||||
| ReadarrEvent::TriggerAutomaticAuthorSearch(_)
|
||||
| ReadarrEvent::UpdateAllAuthors
|
||||
| ReadarrEvent::UpdateAndScanAuthor(_) => "/command",
|
||||
ReadarrEvent::GetHostConfig | ReadarrEvent::GetSecurityConfig => "/config/host",
|
||||
ReadarrEvent::GetDiskSpace => "/diskspace",
|
||||
@@ -178,6 +180,7 @@ impl Network<'_, '_> {
|
||||
.trigger_automatic_author_search(author_id)
|
||||
.await
|
||||
.map(ReadarrSerdeable::from),
|
||||
ReadarrEvent::UpdateAllAuthors => self.update_all_authors().await.map(ReadarrSerdeable::from),
|
||||
ReadarrEvent::UpdateAndScanAuthor(author_id) => self
|
||||
.update_and_scan_author(author_id)
|
||||
.await
|
||||
|
||||
Reference in new issue
Block a user