feat(readarr): fetch Readarr book history and expose it on the CLI

This commit is contained in:
Dark-Alex-17 committed 2026-08-27 15:40:08 -06:00
1 parent 634d1fc1b1
commit b48ce5db2e
6 files changed
+435 -4

No files matched your search

+6 -1
View File
@@ -36,6 +36,7 @@ pub enum ReadarrEvent {
GetBookDetails(i64),
GetBookEditions(i64),
GetBookFiles(i64),
GetBookHistory(i64, i64),
GetBooks(i64),
GetDiskSpace,
GetHostConfig,
@@ -80,7 +81,7 @@ impl NetworkResource for ReadarrEvent {
ReadarrEvent::GetDiskSpace => "/diskspace",
ReadarrEvent::GetBookEditions(_) => "/edition",
ReadarrEvent::HealthCheck => "/health",
ReadarrEvent::GetAuthorHistory(_) => "/history/author",
ReadarrEvent::GetAuthorHistory(_) | ReadarrEvent::GetBookHistory(_, _) => "/history/author",
ReadarrEvent::GetLogs(_) => "/log",
ReadarrEvent::GetMetadataProfiles => "/metadataprofile",
ReadarrEvent::GetQualityProfiles => "/qualityprofile",
@@ -149,6 +150,10 @@ impl Network<'_, '_> {
.get_book_files(book_id)
.await
.map(ReadarrSerdeable::from),
ReadarrEvent::GetBookHistory(author_id, book_id) => self
.get_readarr_book_history(author_id, book_id)
.await
.map(ReadarrSerdeable::from),
ReadarrEvent::GetBooks(author_id) => {
self.get_books(author_id).await.map(ReadarrSerdeable::from)
}