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

This commit is contained in:
Dark-Alex-17 committed 2026-08-27 14:58:47 -06:00
1 parent 817ebeaf90
commit 4c6a9ece4e
7 files changed
+330 -4

No files matched your search

+6
View File
@@ -34,6 +34,7 @@ pub enum ReadarrEvent {
GetAuthorDetails(i64),
GetAuthorHistory(i64),
GetBookDetails(i64),
GetBookEditions(i64),
GetBooks(i64),
GetDiskSpace,
GetHostConfig,
@@ -75,6 +76,7 @@ impl NetworkResource for ReadarrEvent {
| ReadarrEvent::UpdateAndScanAuthor(_) => "/command",
ReadarrEvent::GetHostConfig | ReadarrEvent::GetSecurityConfig => "/config/host",
ReadarrEvent::GetDiskSpace => "/diskspace",
ReadarrEvent::GetBookEditions(_) => "/edition",
ReadarrEvent::HealthCheck => "/health",
ReadarrEvent::GetAuthorHistory(_) => "/history/author",
ReadarrEvent::GetLogs(_) => "/log",
@@ -137,6 +139,10 @@ impl Network<'_, '_> {
.get_book_details(book_id)
.await
.map(ReadarrSerdeable::from),
ReadarrEvent::GetBookEditions(book_id) => self
.get_book_editions(book_id)
.await
.map(ReadarrSerdeable::from),
ReadarrEvent::GetBooks(author_id) => {
self.get_books(author_id).await.map(ReadarrSerdeable::from)
}