This commit is contained in:
2026-01-07 10:45:49 -07:00
parent 9b4eda6a9d
commit 3c1634d1e3
65 changed files with 2355 additions and 100 deletions
@@ -5,6 +5,7 @@ use crate::handlers::table_handler::{TableHandlingConfig, handle_table};
use crate::handlers::{KeyEventHandler, handle_clear_errors, handle_prompt_toggle};
use crate::matches_key;
use crate::models::radarr_models::BlocklistItem;
use crate::models::Route;
use crate::models::servarr_data::radarr::radarr_data::{ActiveRadarrBlock, BLOCKLIST_BLOCKS};
use crate::models::stateful_table::SortOption;
use crate::network::radarr_network::RadarrEvent;
@@ -178,7 +179,7 @@ impl<'a, 'b> KeyEventHandler<'a, 'b, ActiveRadarrBlock> for BlocklistHandler<'a,
self.app
}
fn current_route(&self) -> crate::models::Route {
fn current_route(&self) -> Route {
self.app.get_current_route()
}
}
@@ -3,7 +3,7 @@ use crate::event::Key;
use crate::handlers::KeyEventHandler;
use crate::handlers::table_handler::{TableHandlingConfig, handle_table};
use crate::matches_key;
use crate::models::BlockSelectionState;
use crate::models::{BlockSelectionState, Route};
use crate::models::servarr_data::radarr::radarr_data::{
ADD_MOVIE_SELECTION_BLOCKS, ActiveRadarrBlock, COLLECTION_DETAILS_BLOCKS,
EDIT_COLLECTION_SELECTION_BLOCKS,
@@ -148,7 +148,7 @@ impl<'a, 'b> KeyEventHandler<'a, 'b, ActiveRadarrBlock> for CollectionDetailsHan
self.app
}
fn current_route(&self) -> crate::models::Route {
fn current_route(&self) -> Route {
self.app.get_current_route()
}
}
@@ -1,7 +1,7 @@
use crate::app::App;
use crate::event::Key;
use crate::handlers::{KeyEventHandler, handle_prompt_toggle};
use crate::models::Scrollable;
use crate::models::{Route, Scrollable};
use crate::models::radarr_models::EditCollectionParams;
use crate::models::servarr_data::radarr::modals::EditCollectionModal;
use crate::models::servarr_data::radarr::radarr_data::{ActiveRadarrBlock, EDIT_COLLECTION_BLOCKS};
@@ -376,7 +376,7 @@ impl<'a, 'b> KeyEventHandler<'a, 'b, ActiveRadarrBlock> for EditCollectionHandle
self.app
}
fn current_route(&self) -> crate::models::Route {
fn current_route(&self) -> Route {
self.app.get_current_route()
}
}
@@ -6,7 +6,7 @@ use crate::handlers::radarr_handlers::handle_change_tab_left_right_keys;
use crate::handlers::table_handler::{TableHandlingConfig, handle_table};
use crate::handlers::{KeyEventHandler, handle_clear_errors, handle_prompt_toggle};
use crate::matches_key;
use crate::models::BlockSelectionState;
use crate::models::{BlockSelectionState, Route};
use crate::models::radarr_models::Collection;
use crate::models::servarr_data::radarr::radarr_data::{
ActiveRadarrBlock, COLLECTIONS_BLOCKS, EDIT_COLLECTION_SELECTION_BLOCKS,
@@ -179,7 +179,7 @@ impl<'a, 'b> KeyEventHandler<'a, 'b, ActiveRadarrBlock> for CollectionsHandler<'
self.app
}
fn current_route(&self) -> crate::models::Route {
fn current_route(&self) -> Route {
self.app.get_current_route()
}
}
@@ -4,6 +4,7 @@ use crate::handlers::radarr_handlers::handle_change_tab_left_right_keys;
use crate::handlers::table_handler::{TableHandlingConfig, handle_table};
use crate::handlers::{KeyEventHandler, handle_clear_errors, handle_prompt_toggle};
use crate::matches_key;
use crate::models::Route;
use crate::models::servarr_data::radarr::radarr_data::{ActiveRadarrBlock, DOWNLOADS_BLOCKS};
use crate::network::radarr_network::RadarrEvent;
@@ -164,7 +165,7 @@ impl<'a, 'b> KeyEventHandler<'a, 'b, ActiveRadarrBlock> for DownloadsHandler<'a,
self.app
}
fn current_route(&self) -> crate::models::Route {
fn current_route(&self) -> Route {
self.app.get_current_route()
}
}
@@ -8,6 +8,7 @@ use crate::network::radarr_network::RadarrEvent;
use crate::{
handle_prompt_left_right_keys, handle_text_box_keys, handle_text_box_left_right_keys, matches_key,
};
use crate::models::Route;
#[cfg(test)]
#[path = "edit_indexer_handler_tests.rs"]
@@ -527,7 +528,7 @@ impl<'a, 'b> KeyEventHandler<'a, 'b, ActiveRadarrBlock> for EditIndexerHandler<'
self.app
}
fn current_route(&self) -> crate::models::Route {
fn current_route(&self) -> Route {
self.app.get_current_route()
}
}
@@ -9,6 +9,7 @@ use crate::network::radarr_network::RadarrEvent;
use crate::{
handle_prompt_left_right_keys, handle_text_box_keys, handle_text_box_left_right_keys, matches_key,
};
use crate::models::Route;
#[cfg(test)]
#[path = "edit_indexer_settings_handler_tests.rs"]
@@ -293,7 +294,7 @@ impl<'a, 'b> KeyEventHandler<'a, 'b, ActiveRadarrBlock> for IndexerSettingsHandl
self.app
}
fn current_route(&self) -> crate::models::Route {
fn current_route(&self) -> Route {
self.app.get_current_route()
}
}
+2 -2
View File
@@ -7,7 +7,7 @@ use crate::handlers::radarr_handlers::indexers::test_all_indexers_handler::TestA
use crate::handlers::table_handler::{TableHandlingConfig, handle_table};
use crate::handlers::{KeyEventHandler, handle_clear_errors, handle_prompt_toggle};
use crate::matches_key;
use crate::models::BlockSelectionState;
use crate::models::{BlockSelectionState, Route};
use crate::models::servarr_data::radarr::radarr_data::{
ActiveRadarrBlock, EDIT_INDEXER_NZB_SELECTION_BLOCKS, EDIT_INDEXER_TORRENT_SELECTION_BLOCKS,
INDEXER_SETTINGS_SELECTION_BLOCKS, INDEXERS_BLOCKS,
@@ -212,7 +212,7 @@ impl<'a, 'b> KeyEventHandler<'a, 'b, ActiveRadarrBlock> for IndexersHandler<'a,
self.app
}
fn current_route(&self) -> crate::models::Route {
fn current_route(&self) -> Route {
self.app.get_current_route()
}
}
@@ -2,6 +2,7 @@ use crate::app::App;
use crate::event::Key;
use crate::handlers::KeyEventHandler;
use crate::handlers::table_handler::{TableHandlingConfig, handle_table};
use crate::models::Route;
use crate::models::servarr_data::radarr::radarr_data::ActiveRadarrBlock;
#[cfg(test)]
@@ -101,7 +102,7 @@ impl<'a, 'b> KeyEventHandler<'a, 'b, ActiveRadarrBlock> for TestAllIndexersHandl
self.app
}
fn current_route(&self) -> crate::models::Route {
fn current_route(&self) -> Route {
self.app.get_current_route()
}
}
@@ -7,7 +7,7 @@ use crate::models::servarr_data::radarr::modals::AddMovieModal;
use crate::models::servarr_data::radarr::radarr_data::{
ADD_MOVIE_BLOCKS, ADD_MOVIE_SELECTION_BLOCKS, ActiveRadarrBlock,
};
use crate::models::{BlockSelectionState, Scrollable};
use crate::models::{BlockSelectionState, Route, Scrollable};
use crate::network::radarr_network::RadarrEvent;
use crate::{App, Key, handle_text_box_keys, handle_text_box_left_right_keys, matches_key};
@@ -558,7 +558,7 @@ impl<'a, 'b> KeyEventHandler<'a, 'b, ActiveRadarrBlock> for AddMovieHandler<'a,
self.app
}
fn current_route(&self) -> crate::models::Route {
fn current_route(&self) -> Route {
self.app.get_current_route()
}
}
@@ -3,6 +3,7 @@ use crate::event::Key;
use crate::handlers::{KeyEventHandler, handle_prompt_toggle};
use crate::matches_key;
use crate::models::radarr_models::DeleteMovieParams;
use crate::models::Route;
use crate::models::servarr_data::radarr::radarr_data::{ActiveRadarrBlock, DELETE_MOVIE_BLOCKS};
use crate::network::radarr_network::RadarrEvent;
@@ -141,7 +142,7 @@ impl<'a, 'b> KeyEventHandler<'a, 'b, ActiveRadarrBlock> for DeleteMovieHandler<'
self.app
}
fn current_route(&self) -> crate::models::Route {
fn current_route(&self) -> Route {
self.app.get_current_route()
}
}
@@ -1,7 +1,7 @@
use crate::app::App;
use crate::event::Key;
use crate::handlers::{KeyEventHandler, handle_prompt_toggle};
use crate::models::Scrollable;
use crate::models::{Route, Scrollable};
use crate::models::radarr_models::EditMovieParams;
use crate::models::servarr_data::radarr::modals::EditMovieModal;
use crate::models::servarr_data::radarr::radarr_data::{ActiveRadarrBlock, EDIT_MOVIE_BLOCKS};
@@ -397,7 +397,7 @@ impl<'a, 'b> KeyEventHandler<'a, 'b, ActiveRadarrBlock> for EditMovieHandler<'a,
self.app
}
fn current_route(&self) -> crate::models::Route {
fn current_route(&self) -> Route {
self.app.get_current_route()
}
}
@@ -11,7 +11,7 @@ use crate::models::servarr_data::radarr::radarr_data::{
};
use crate::models::servarr_models::Language;
use crate::models::stateful_table::SortOption;
use crate::models::{BlockSelectionState, Scrollable};
use crate::models::{BlockSelectionState, Route, Scrollable};
use crate::network::radarr_network::RadarrEvent;
#[cfg(test)]
@@ -379,7 +379,7 @@ impl<'a, 'b> KeyEventHandler<'a, 'b, ActiveRadarrBlock> for MovieDetailsHandler<
self.app
}
fn current_route(&self) -> crate::models::Route {
fn current_route(&self) -> Route {
self.app.get_current_route()
}
}
+2 -1
View File
@@ -8,6 +8,7 @@ use crate::handlers::radarr_handlers::root_folders::RootFoldersHandler;
use crate::handlers::radarr_handlers::system::SystemHandler;
use crate::models::servarr_data::radarr::radarr_data::ActiveRadarrBlock;
use crate::{App, Key, matches_key};
use crate::models::Route;
mod blocklist;
mod collections;
@@ -112,7 +113,7 @@ impl<'a, 'b> KeyEventHandler<'a, 'b, ActiveRadarrBlock> for RadarrHandler<'a, 'b
self.app
}
fn current_route(&self) -> crate::models::Route {
fn current_route(&self) -> Route {
self.app.get_current_route()
}
}
@@ -3,7 +3,7 @@ use crate::event::Key;
use crate::handlers::radarr_handlers::handle_change_tab_left_right_keys;
use crate::handlers::table_handler::{TableHandlingConfig, handle_table};
use crate::handlers::{KeyEventHandler, handle_clear_errors, handle_prompt_toggle};
use crate::models::HorizontallyScrollableText;
use crate::models::{HorizontallyScrollableText, Route};
use crate::models::servarr_data::radarr::radarr_data::{ActiveRadarrBlock, ROOT_FOLDERS_BLOCKS};
use crate::models::servarr_models::AddRootFolderBody;
use crate::network::radarr_network::RadarrEvent;
@@ -231,7 +231,7 @@ impl<'a, 'b> KeyEventHandler<'a, 'b, ActiveRadarrBlock> for RootFoldersHandler<'
self.app
}
fn current_route(&self) -> crate::models::Route {
fn current_route(&self) -> Route {
self.app.get_current_route()
}
}
+2 -2
View File
@@ -4,7 +4,7 @@ use crate::handlers::radarr_handlers::handle_change_tab_left_right_keys;
use crate::handlers::radarr_handlers::system::system_details_handler::SystemDetailsHandler;
use crate::handlers::{KeyEventHandler, handle_clear_errors};
use crate::matches_key;
use crate::models::Scrollable;
use crate::models::{Route, Scrollable};
use crate::models::servarr_data::radarr::radarr_data::ActiveRadarrBlock;
mod system_details_handler;
@@ -129,7 +129,7 @@ impl<'a, 'b> KeyEventHandler<'a, 'b, ActiveRadarrBlock> for SystemHandler<'a, 'b
self.app
}
fn current_route(&self) -> crate::models::Route {
fn current_route(&self) -> Route {
self.app.get_current_route()
}
}
@@ -2,7 +2,7 @@ use crate::app::App;
use crate::event::Key;
use crate::handlers::{KeyEventHandler, handle_prompt_toggle};
use crate::matches_key;
use crate::models::Scrollable;
use crate::models::{Route, Scrollable};
use crate::models::radarr_models::RadarrTaskName;
use crate::models::servarr_data::radarr::radarr_data::{ActiveRadarrBlock, SYSTEM_DETAILS_BLOCKS};
use crate::models::stateful_list::StatefulList;
@@ -201,7 +201,7 @@ impl<'a, 'b> KeyEventHandler<'a, 'b, ActiveRadarrBlock> for SystemDetailsHandler
self.app
}
fn current_route(&self) -> crate::models::Route {
fn current_route(&self) -> Route {
self.app.get_current_route()
}
}