feat(readarr): refresh Readarr downloads and expose the command on the CLI
This commit is contained in:
6 files changed
+112
-1
No files matched your search
@@ -29,6 +29,8 @@ pub enum ReadarrRefreshCommand {
|
||||
)]
|
||||
author_id: i64,
|
||||
},
|
||||
#[command(about = "Refresh all downloads in Readarr")]
|
||||
Downloads,
|
||||
}
|
||||
|
||||
impl From<ReadarrRefreshCommand> for Command {
|
||||
@@ -74,6 +76,13 @@ impl<'a, 'b> CliCommandHandler<'a, 'b, ReadarrRefreshCommand>
|
||||
.await?;
|
||||
serde_json::to_string_pretty(&resp)?
|
||||
}
|
||||
ReadarrRefreshCommand::Downloads => {
|
||||
let resp = self
|
||||
.network
|
||||
.handle_network_event(ReadarrEvent::UpdateDownloads.into())
|
||||
.await?;
|
||||
serde_json::to_string_pretty(&resp)?
|
||||
}
|
||||
};
|
||||
|
||||
Ok(result)
|
||||
|
||||
Reference in new issue
Block a user