feat(readarr): toggle Readarr author monitoring and expose the command on the CLI

This commit is contained in:
Dark-Alex-17 committed 2026-08-27 10:09:04 -06:00
1 parent ac8a11233f
commit f896b65fd9
6 files changed
+221 -2

No files matched your search

+7 -1
View File
@@ -48,6 +48,7 @@ pub enum ReadarrEvent {
ListAuthors,
SearchNewAuthor(String),
StartTask(ReadarrTaskName),
ToggleAuthorMonitoring(i64),
}
impl NetworkResource for ReadarrEvent {
@@ -57,7 +58,8 @@ impl NetworkResource for ReadarrEvent {
| ReadarrEvent::DeleteAuthor(_)
| ReadarrEvent::EditAuthor(_)
| ReadarrEvent::GetAuthorDetails(_)
| ReadarrEvent::ListAuthors => "/author",
| ReadarrEvent::ListAuthors
| ReadarrEvent::ToggleAuthorMonitoring(_) => "/author",
ReadarrEvent::SearchNewAuthor(_) => "/author/lookup",
ReadarrEvent::GetQueuedEvents | ReadarrEvent::StartTask(_) => "/command",
ReadarrEvent::GetHostConfig | ReadarrEvent::GetSecurityConfig => "/config/host",
@@ -163,6 +165,10 @@ impl Network<'_, '_> {
.start_readarr_task(task_name)
.await
.map(ReadarrSerdeable::from),
ReadarrEvent::ToggleAuthorMonitoring(author_id) => self
.toggle_author_monitoring(author_id)
.await
.map(ReadarrSerdeable::from),
}
}