feat(readarr): delete an item from the blocklist and expose the command on the CLI
This commit is contained in:
6 files changed
+161
No files matched your search
@@ -27,6 +27,15 @@ pub enum ReadarrDeleteCommand {
|
||||
#[arg(long, help = "Add a list exclusion for this author")]
|
||||
add_list_exclusion: bool,
|
||||
},
|
||||
#[command(about = "Delete the specified item from the Readarr blocklist")]
|
||||
BlocklistItem {
|
||||
#[arg(
|
||||
long,
|
||||
help = "The ID of the blocklist item to remove from the blocklist",
|
||||
required = true
|
||||
)]
|
||||
blocklist_item_id: i64,
|
||||
},
|
||||
#[command(about = "Delete a book from your Readarr library")]
|
||||
Book {
|
||||
#[arg(long, help = "The ID of the book to delete", required = true)]
|
||||
@@ -103,6 +112,13 @@ impl<'a, 'b> CliCommandHandler<'a, 'b, ReadarrDeleteCommand>
|
||||
.await?;
|
||||
serde_json::to_string_pretty(&resp)?
|
||||
}
|
||||
ReadarrDeleteCommand::BlocklistItem { blocklist_item_id } => {
|
||||
let resp = self
|
||||
.network
|
||||
.handle_network_event(ReadarrEvent::DeleteBlocklistItem(blocklist_item_id).into())
|
||||
.await?;
|
||||
serde_json::to_string_pretty(&resp)?
|
||||
}
|
||||
ReadarrDeleteCommand::Book {
|
||||
book_id,
|
||||
delete_files_from_disk,
|
||||
|
||||
Reference in new issue
Block a user