feat: Support for multiple servarr definitions - no tests [skip ci]

This commit is contained in:
2025-02-27 18:00:28 -07:00
parent 111485e7c4
commit 9b63b10118
9 changed files with 191 additions and 112 deletions
+26 -13
View File
@@ -121,86 +121,99 @@ impl<'a> Default for RadarrData<'a> {
add_list_exclusion: false,
main_tabs: TabState::new(vec![
TabRoute {
title: "Library",
title: "Library".to_string(),
route: ActiveRadarrBlock::Movies.into(),
help: String::new(),
contextual_help: Some(build_context_clue_string(&LIBRARY_CONTEXT_CLUES)),
config: None,
},
TabRoute {
title: "Collections",
title: "Collections".to_string(),
route: ActiveRadarrBlock::Collections.into(),
help: String::new(),
contextual_help: Some(build_context_clue_string(&COLLECTIONS_CONTEXT_CLUES)),
config: None,
},
TabRoute {
title: "Downloads",
title: "Downloads".to_string(),
route: ActiveRadarrBlock::Downloads.into(),
help: String::new(),
contextual_help: Some(build_context_clue_string(&DOWNLOADS_CONTEXT_CLUES)),
config: None,
},
TabRoute {
title: "Blocklist",
title: "Blocklist".to_string(),
route: ActiveRadarrBlock::Blocklist.into(),
help: String::new(),
contextual_help: Some(build_context_clue_string(&BLOCKLIST_CONTEXT_CLUES)),
config: None,
},
TabRoute {
title: "Root Folders",
title: "Root Folders".to_string(),
route: ActiveRadarrBlock::RootFolders.into(),
help: String::new(),
contextual_help: Some(build_context_clue_string(&ROOT_FOLDERS_CONTEXT_CLUES)),
config: None,
},
TabRoute {
title: "Indexers",
title: "Indexers".to_string(),
route: ActiveRadarrBlock::Indexers.into(),
help: String::new(),
contextual_help: Some(build_context_clue_string(&INDEXERS_CONTEXT_CLUES)),
config: None,
},
TabRoute {
title: "System",
title: "System".to_string(),
route: ActiveRadarrBlock::System.into(),
help: String::new(),
contextual_help: Some(build_context_clue_string(&SYSTEM_CONTEXT_CLUES)),
config: None,
},
]),
movie_info_tabs: TabState::new(vec![
TabRoute {
title: "Details",
title: "Details".to_string(),
route: ActiveRadarrBlock::MovieDetails.into(),
help: build_context_clue_string(&MOVIE_DETAILS_CONTEXT_CLUES),
contextual_help: None,
config: None,
},
TabRoute {
title: "History",
title: "History".to_string(),
route: ActiveRadarrBlock::MovieHistory.into(),
help: build_context_clue_string(&MOVIE_DETAILS_CONTEXT_CLUES),
contextual_help: None,
config: None,
},
TabRoute {
title: "File",
title: "File".to_string(),
route: ActiveRadarrBlock::FileInfo.into(),
help: build_context_clue_string(&MOVIE_DETAILS_CONTEXT_CLUES),
contextual_help: None,
config: None,
},
TabRoute {
title: "Cast",
title: "Cast".to_string(),
route: ActiveRadarrBlock::Cast.into(),
help: build_context_clue_string(&MOVIE_DETAILS_CONTEXT_CLUES),
contextual_help: None,
config: None,
},
TabRoute {
title: "Crew",
title: "Crew".to_string(),
route: ActiveRadarrBlock::Crew.into(),
help: build_context_clue_string(&MOVIE_DETAILS_CONTEXT_CLUES),
contextual_help: None,
config: None,
},
TabRoute {
title: "Manual Search",
title: "Manual Search".to_string(),
route: ActiveRadarrBlock::ManualSearch.into(),
help: build_context_clue_string(&MANUAL_MOVIE_SEARCH_CONTEXT_CLUES),
contextual_help: Some(build_context_clue_string(
&MANUAL_MOVIE_SEARCH_CONTEXTUAL_CONTEXT_CLUES,
)),
config: None,
},
]),
}
+14 -7
View File
@@ -280,28 +280,32 @@ impl Default for EpisodeDetailsModal {
episode_releases: StatefulTable::default(),
episode_details_tabs: TabState::new(vec![
TabRoute {
title: "Details",
title: "Details".to_string(),
route: ActiveSonarrBlock::EpisodeDetails.into(),
help: build_context_clue_string(&EPISODE_DETAILS_CONTEXT_CLUES),
contextual_help: None,
config: None,
},
TabRoute {
title: "History",
title: "History".to_string(),
route: ActiveSonarrBlock::EpisodeHistory.into(),
help: build_context_clue_string(&EPISODE_DETAILS_CONTEXT_CLUES),
contextual_help: Some(build_context_clue_string(&DETAILS_CONTEXTUAL_CONTEXT_CLUES)),
config: None,
},
TabRoute {
title: "File",
title: "File".to_string(),
route: ActiveSonarrBlock::EpisodeFile.into(),
help: build_context_clue_string(&EPISODE_DETAILS_CONTEXT_CLUES),
contextual_help: None,
config: None,
},
TabRoute {
title: "Manual Search",
title: "Manual Search".to_string(),
route: ActiveSonarrBlock::ManualEpisodeSearch.into(),
help: build_context_clue_string(&MANUAL_EPISODE_SEARCH_CONTEXT_CLUES),
contextual_help: Some(build_context_clue_string(&DETAILS_CONTEXTUAL_CONTEXT_CLUES)),
config: None,
},
]),
}
@@ -327,24 +331,27 @@ impl Default for SeasonDetailsModal {
season_history: StatefulTable::default(),
season_details_tabs: TabState::new(vec![
TabRoute {
title: "Episodes",
title: "Episodes".to_string(),
route: ActiveSonarrBlock::SeasonDetails.into(),
help: build_context_clue_string(&SEASON_DETAILS_CONTEXT_CLUES),
contextual_help: Some(build_context_clue_string(
&SEASON_DETAILS_CONTEXTUAL_CONTEXT_CLUES,
)),
config: None,
},
TabRoute {
title: "History",
title: "History".to_string(),
route: ActiveSonarrBlock::SeasonHistory.into(),
help: build_context_clue_string(&SEASON_HISTORY_CONTEXT_CLUES),
contextual_help: Some(build_context_clue_string(&DETAILS_CONTEXTUAL_CONTEXT_CLUES)),
config: None,
},
TabRoute {
title: "Manual Search",
title: "Manual Search".to_string(),
route: ActiveSonarrBlock::ManualSeasonSearch.into(),
help: build_context_clue_string(&MANUAL_SEASON_SEARCH_CONTEXT_CLUES),
contextual_help: Some(build_context_clue_string(&DETAILS_CONTEXTUAL_CONTEXT_CLUES)),
config: None,
},
]),
}
+18 -9
View File
@@ -128,60 +128,69 @@ impl<'a> Default for SonarrData<'a> {
version: String::new(),
main_tabs: TabState::new(vec![
TabRoute {
title: "Library",
title: "Library".to_string(),
route: ActiveSonarrBlock::Series.into(),
help: String::new(),
contextual_help: Some(build_context_clue_string(&SERIES_CONTEXT_CLUES)),
config: None,
},
TabRoute {
title: "Downloads",
title: "Downloads".to_string(),
route: ActiveSonarrBlock::Downloads.into(),
help: String::new(),
contextual_help: Some(build_context_clue_string(&DOWNLOADS_CONTEXT_CLUES)),
config: None,
},
TabRoute {
title: "Blocklist",
title: "Blocklist".to_string(),
route: ActiveSonarrBlock::Blocklist.into(),
help: String::new(),
contextual_help: Some(build_context_clue_string(&BLOCKLIST_CONTEXT_CLUES)),
config: None,
},
TabRoute {
title: "History",
title: "History".to_string(),
route: ActiveSonarrBlock::History.into(),
help: String::new(),
contextual_help: Some(build_context_clue_string(&HISTORY_CONTEXT_CLUES)),
config: None,
},
TabRoute {
title: "Root Folders",
title: "Root Folders".to_string(),
route: ActiveSonarrBlock::RootFolders.into(),
help: String::new(),
contextual_help: Some(build_context_clue_string(&ROOT_FOLDERS_CONTEXT_CLUES)),
config: None,
},
TabRoute {
title: "Indexers",
title: "Indexers".to_string(),
route: ActiveSonarrBlock::Indexers.into(),
help: String::new(),
contextual_help: Some(build_context_clue_string(&INDEXERS_CONTEXT_CLUES)),
config: None,
},
TabRoute {
title: "System",
title: "System".to_string(),
route: ActiveSonarrBlock::System.into(),
help: String::new(),
contextual_help: Some(build_context_clue_string(&SYSTEM_CONTEXT_CLUES)),
config: None,
},
]),
series_info_tabs: TabState::new(vec![
TabRoute {
title: "Seasons",
title: "Seasons".to_string(),
route: ActiveSonarrBlock::SeriesDetails.into(),
help: String::new(),
contextual_help: Some(build_context_clue_string(&SERIES_DETAILS_CONTEXT_CLUES)),
config: None,
},
TabRoute {
title: "History",
title: "History".to_string(),
route: ActiveSonarrBlock::SeriesHistory.into(),
help: String::new(),
contextual_help: Some(build_context_clue_string(&SERIES_HISTORY_CONTEXT_CLUES)),
config: None,
},
]),
}