feat(cli): Support for refreshing Sonarr downloads
This commit is contained in:
@@ -28,6 +28,8 @@ pub enum SonarrRefreshCommand {
|
||||
)]
|
||||
series_id: i64,
|
||||
},
|
||||
#[command(about = "Refresh all downloads in Sonarr")]
|
||||
Downloads,
|
||||
}
|
||||
|
||||
impl From<SonarrRefreshCommand> for Command {
|
||||
@@ -73,6 +75,13 @@ impl<'a, 'b> CliCommandHandler<'a, 'b, SonarrRefreshCommand>
|
||||
.await?;
|
||||
serde_json::to_string_pretty(&resp)?
|
||||
}
|
||||
SonarrRefreshCommand::Downloads => {
|
||||
let resp = self
|
||||
.network
|
||||
.handle_network_event(SonarrEvent::UpdateDownloads.into())
|
||||
.await?;
|
||||
serde_json::to_string_pretty(&resp)?
|
||||
}
|
||||
};
|
||||
|
||||
Ok(result)
|
||||
|
||||
Reference in New Issue
Block a user