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

This commit is contained in:
Dark-Alex-17 committed 2026-08-27 15:22:50 -06:00
1 parent 4c6a9ece4e
commit 634d1fc1b1
7 files changed
+274 -5

No files matched your search

+6
View File
@@ -35,6 +35,7 @@ pub enum ReadarrEvent {
GetAuthorHistory(i64),
GetBookDetails(i64),
GetBookEditions(i64),
GetBookFiles(i64),
GetBooks(i64),
GetDiskSpace,
GetHostConfig,
@@ -69,6 +70,7 @@ impl NetworkResource for ReadarrEvent {
| ReadarrEvent::ToggleAuthorMonitoring(_) => "/author",
ReadarrEvent::SearchNewAuthor(_) => "/author/lookup",
ReadarrEvent::GetBookDetails(_) | ReadarrEvent::GetBooks(_) => "/book",
ReadarrEvent::GetBookFiles(_) => "/bookfile",
ReadarrEvent::GetQueuedEvents
| ReadarrEvent::StartTask(_)
| ReadarrEvent::TriggerAutomaticAuthorSearch(_)
@@ -143,6 +145,10 @@ impl Network<'_, '_> {
.get_book_editions(book_id)
.await
.map(ReadarrSerdeable::from),
ReadarrEvent::GetBookFiles(book_id) => self
.get_book_files(book_id)
.await
.map(ReadarrSerdeable::from),
ReadarrEvent::GetBooks(author_id) => {
self.get_books(author_id).await.map(ReadarrSerdeable::from)
}