feat(readarr): fetch Readarr book details and expose them on the CLI

This commit is contained in:
Dark-Alex-17 committed 2026-08-27 14:51:40 -06:00
1 parent 41830cc072
commit 817ebeaf90
6 files changed
+147 -1

No files matched your search

+6 -1
View File
@@ -33,6 +33,7 @@ pub enum ReadarrEvent {
EditAuthor(EditAuthorParams),
GetAuthorDetails(i64),
GetAuthorHistory(i64),
GetBookDetails(i64),
GetBooks(i64),
GetDiskSpace,
GetHostConfig,
@@ -66,7 +67,7 @@ impl NetworkResource for ReadarrEvent {
| ReadarrEvent::ListAuthors
| ReadarrEvent::ToggleAuthorMonitoring(_) => "/author",
ReadarrEvent::SearchNewAuthor(_) => "/author/lookup",
ReadarrEvent::GetBooks(_) => "/book",
ReadarrEvent::GetBookDetails(_) | ReadarrEvent::GetBooks(_) => "/book",
ReadarrEvent::GetQueuedEvents
| ReadarrEvent::StartTask(_)
| ReadarrEvent::TriggerAutomaticAuthorSearch(_)
@@ -132,6 +133,10 @@ impl Network<'_, '_> {
.get_readarr_author_history(author_id)
.await
.map(ReadarrSerdeable::from),
ReadarrEvent::GetBookDetails(book_id) => self
.get_book_details(book_id)
.await
.map(ReadarrSerdeable::from),
ReadarrEvent::GetBooks(author_id) => {
self.get_books(author_id).await.map(ReadarrSerdeable::from)
}