feat(handler): System handler support for Sonarr

This commit is contained in:
2024-12-04 17:04:36 -07:00
parent 1b5d70ae2d
commit 2d251554ad
8 changed files with 1938 additions and 0 deletions
+5
View File
@@ -4,6 +4,7 @@ use history::HistoryHandler;
use indexers::IndexersHandler;
use library::LibraryHandler;
use root_folders::RootFoldersHandler;
use system::SystemHandler;
use crate::{
app::{key_binding::DEFAULT_KEYBINDINGS, App},
@@ -19,6 +20,7 @@ mod history;
mod indexers;
mod library;
mod root_folders;
mod system;
#[cfg(test)]
#[path = "sonarr_handler_tests.rs"]
@@ -57,6 +59,9 @@ impl<'a, 'b> KeyEventHandler<'a, 'b, ActiveSonarrBlock> for SonarrHandler<'a, 'b
_ if IndexersHandler::accepts(self.active_sonarr_block) => {
IndexersHandler::with(self.key, self.app, self.active_sonarr_block, self.context).handle()
}
_ if SystemHandler::accepts(self.active_sonarr_block) => {
SystemHandler::with(self.key, self.app, self.active_sonarr_block, self.context).handle()
}
_ => self.handle_key_event(),
}
}