feat(readarr): delete a book file and expose the command on the CLI

This commit is contained in:
Dark-Alex-17 committed 2026-08-28 12:58:41 -06:00
1 parent fbfd64eb2a
commit 3569bcc036
6 files changed
+148 -1

No files matched your search

+12
View File
@@ -36,6 +36,11 @@ pub enum ReadarrDeleteCommand {
#[arg(long, help = "Add a list exclusion for this book")]
add_list_exclusion: bool,
},
#[command(about = "Delete the specified book file from disk")]
BookFile {
#[arg(long, help = "The ID of the book file to delete", required = true)]
book_file_id: i64,
},
#[command(about = "Delete the root folder with the given ID")]
RootFolder {
#[arg(long, help = "The ID of the root folder to delete", required = true)]
@@ -109,6 +114,13 @@ impl<'a, 'b> CliCommandHandler<'a, 'b, ReadarrDeleteCommand>
.await?;
serde_json::to_string_pretty(&resp)?
}
ReadarrDeleteCommand::BookFile { book_file_id } => {
let resp = self
.network
.handle_network_event(ReadarrEvent::DeleteBookFile(book_file_id).into())
.await?;
serde_json::to_string_pretty(&resp)?
}
ReadarrDeleteCommand::RootFolder { root_folder_id } => {
let resp = self
.network