feat(readarr): fetch releases for a book and expose them on the CLI
This commit is contained in:
7 files changed
+333
-4
No files matched your search
@@ -98,6 +98,15 @@ pub enum ReadarrListCommand {
|
||||
QualityProfiles,
|
||||
#[command(about = "List all queued events")]
|
||||
QueuedEvents,
|
||||
#[command(about = "Trigger a manual search for releases of the book with the given ID")]
|
||||
Releases {
|
||||
#[arg(
|
||||
long,
|
||||
help = "The Readarr ID of the book whose releases you wish to search for",
|
||||
required = true
|
||||
)]
|
||||
book_id: i64,
|
||||
},
|
||||
#[command(about = "List all root folders in Readarr")]
|
||||
RootFolders,
|
||||
#[command(about = "List all Readarr tags")]
|
||||
@@ -236,6 +245,14 @@ impl<'a, 'b> CliCommandHandler<'a, 'b, ReadarrListCommand> for ReadarrListComman
|
||||
.await?;
|
||||
serde_json::to_string_pretty(&resp)?
|
||||
}
|
||||
ReadarrListCommand::Releases { book_id } => {
|
||||
println!("Searching for book releases. This may take a minute...");
|
||||
let resp = self
|
||||
.network
|
||||
.handle_network_event(ReadarrEvent::GetBookReleases(book_id).into())
|
||||
.await?;
|
||||
serde_json::to_string_pretty(&resp)?
|
||||
}
|
||||
ReadarrListCommand::RootFolders => {
|
||||
let resp = self
|
||||
.network
|
||||
|
||||
Reference in new issue
Block a user