feat(readarr): trigger an automatic book search and expose the command on the CLI

This commit is contained in:
Dark-Alex-17 committed 2026-08-27 15:52:44 -06:00
1 parent b48ce5db2e
commit f2787560d6
6 files changed
+159 -1

No files matched your search

+6
View File
@@ -56,6 +56,7 @@ pub enum ReadarrEvent {
StartTask(ReadarrTaskName),
ToggleAuthorMonitoring(i64),
TriggerAutomaticAuthorSearch(i64),
TriggerAutomaticBookSearch(i64),
UpdateAllAuthors,
UpdateAndScanAuthor(i64),
}
@@ -75,6 +76,7 @@ impl NetworkResource for ReadarrEvent {
ReadarrEvent::GetQueuedEvents
| ReadarrEvent::StartTask(_)
| ReadarrEvent::TriggerAutomaticAuthorSearch(_)
| ReadarrEvent::TriggerAutomaticBookSearch(_)
| ReadarrEvent::UpdateAllAuthors
| ReadarrEvent::UpdateAndScanAuthor(_) => "/command",
ReadarrEvent::GetHostConfig | ReadarrEvent::GetSecurityConfig => "/config/host",
@@ -213,6 +215,10 @@ impl Network<'_, '_> {
.trigger_automatic_author_search(author_id)
.await
.map(ReadarrSerdeable::from),
ReadarrEvent::TriggerAutomaticBookSearch(book_id) => self
.trigger_automatic_book_search(book_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)