feat(readarr): fetch Readarr author history and expose it on the CLI
Add the GetAuthorHistory event, backed by GET /history/author?authorId=N, which returns a flat array of history records for a single author. The fetcher mirrors the artist-history equivalent, sorting by id and carrying the sort-prompt route guard so a refresh landing while the sort prompt is open cannot clobber an in-progress sort selection. Expose it as `readarr list author-history --author-id N`.
This commit is contained in:
7 files changed
+402
-6
No files matched your search
@@ -32,6 +32,7 @@ pub enum ReadarrEvent {
|
||||
DeleteTag(i64),
|
||||
EditAuthor(EditAuthorParams),
|
||||
GetAuthorDetails(i64),
|
||||
GetAuthorHistory(i64),
|
||||
GetDiskSpace,
|
||||
GetHostConfig,
|
||||
GetLogs(u64),
|
||||
@@ -72,6 +73,7 @@ impl NetworkResource for ReadarrEvent {
|
||||
ReadarrEvent::GetHostConfig | ReadarrEvent::GetSecurityConfig => "/config/host",
|
||||
ReadarrEvent::GetDiskSpace => "/diskspace",
|
||||
ReadarrEvent::HealthCheck => "/health",
|
||||
ReadarrEvent::GetAuthorHistory(_) => "/history/author",
|
||||
ReadarrEvent::GetLogs(_) => "/log",
|
||||
ReadarrEvent::GetMetadataProfiles => "/metadataprofile",
|
||||
ReadarrEvent::GetQualityProfiles => "/qualityprofile",
|
||||
@@ -124,6 +126,10 @@ impl Network<'_, '_> {
|
||||
.get_author_details(author_id)
|
||||
.await
|
||||
.map(ReadarrSerdeable::from),
|
||||
ReadarrEvent::GetAuthorHistory(author_id) => self
|
||||
.get_readarr_author_history(author_id)
|
||||
.await
|
||||
.map(ReadarrSerdeable::from),
|
||||
ReadarrEvent::GetDiskSpace => self
|
||||
.get_readarr_diskspace()
|
||||
.await
|
||||
|
||||
Reference in new issue
Block a user