feat(readarr): add the delete author handler
Handles the delete author prompt, toggling whether to delete files on disk and whether to add a list exclusion before confirming. Backing out of the prompt resets both toggles, so preferences from an abandoned delete cannot leak into the next one.
This commit is contained in:
4 files changed
+654
-2
No files matched your search
@@ -15,7 +15,7 @@ mod tests {
|
||||
use crate::models::readarr_models::{Author, AuthorStatistics, AuthorStatus};
|
||||
use crate::models::servarr_data::readarr::readarr_data::{
|
||||
ADD_AUTHOR_BLOCKS, AUTHOR_DETAILS_BLOCKS, ActiveReadarrBlock, BOOK_DETAILS_BLOCKS,
|
||||
EDIT_AUTHOR_BLOCKS, EDITION_DETAILS_BLOCKS, LIBRARY_BLOCKS,
|
||||
DELETE_AUTHOR_BLOCKS, EDIT_AUTHOR_BLOCKS, EDITION_DETAILS_BLOCKS, LIBRARY_BLOCKS,
|
||||
};
|
||||
use crate::test_handler_delegation;
|
||||
|
||||
@@ -898,6 +898,15 @@ mod tests {
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_delegates_delete_author_blocks_to_delete_author_handler() {
|
||||
test_handler_delegation!(
|
||||
LibraryHandler,
|
||||
ActiveReadarrBlock::Authors,
|
||||
ActiveReadarrBlock::DeleteAuthorPrompt
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_delegates_edit_author_blocks_to_edit_author_handler() {
|
||||
test_handler_delegation!(
|
||||
@@ -915,6 +924,7 @@ mod tests {
|
||||
library_handler_blocks.extend(BOOK_DETAILS_BLOCKS);
|
||||
library_handler_blocks.extend(EDITION_DETAILS_BLOCKS);
|
||||
library_handler_blocks.extend(ADD_AUTHOR_BLOCKS);
|
||||
library_handler_blocks.extend(DELETE_AUTHOR_BLOCKS);
|
||||
library_handler_blocks.extend(EDIT_AUTHOR_BLOCKS);
|
||||
|
||||
ActiveReadarrBlock::iter().for_each(|readarr_block| {
|
||||
|
||||
Reference in new issue
Block a user