feat(readarr): add the edit author handler

Handles the multi-step edit prompt covering monitored, monitor new
items, quality profile, metadata profile, path, tags, and confirmation.

The prompt can be opened from either the author list or the author
details view, so the originating block is threaded through to the
sub-block pushes and Esc returns to the view the user came from.
This commit is contained in:
Dark-Alex-17 committed 2026-09-03 17:07:53 -06:00
1 parent ab9645dee9
commit dc4b11cf1b
4 files changed
+1832 -2

No files matched your search

+7 -1
View File
@@ -22,11 +22,12 @@ use crate::models::Route;
mod add_author_handler;
mod author_details_handler;
mod book_details_handler;
mod edit_author_handler;
mod edition_details_handler;
pub(in crate::handlers::readarr_handlers) use {
add_author_handler::AddAuthorHandler, author_details_handler::AuthorDetailsHandler,
book_details_handler::BookDetailsHandler,
book_details_handler::BookDetailsHandler, edit_author_handler::EditAuthorHandler,
};
#[cfg(test)]
@@ -69,6 +70,10 @@ impl<'a, 'b> KeyEventHandler<'a, 'b, ActiveReadarrBlock> for LibraryHandler<'a,
AddAuthorHandler::new(self.key, self.app, self.active_readarr_block, self.context)
.handle();
}
_ if EditAuthorHandler::accepts(self.active_readarr_block) => {
EditAuthorHandler::new(self.key, self.app, self.active_readarr_block, self.context)
.handle();
}
_ if AuthorDetailsHandler::accepts(self.active_readarr_block) => {
AuthorDetailsHandler::new(self.key, self.app, self.active_readarr_block, self.context)
.handle();
@@ -84,6 +89,7 @@ impl<'a, 'b> KeyEventHandler<'a, 'b, ActiveReadarrBlock> for LibraryHandler<'a,
fn accepts(active_block: ActiveReadarrBlock) -> bool {
AddAuthorHandler::accepts(active_block)
|| EditAuthorHandler::accepts(active_block)
|| AuthorDetailsHandler::accepts(active_block)
|| BookDetailsHandler::accepts(active_block)
|| LIBRARY_BLOCKS.contains(&active_block)