feat(readarr): toggle Readarr author monitoring and expose the command on the CLI
This commit is contained in:
6 files changed
+221
-2
No files matched your search
@@ -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),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user