Partial implementation for additional add-movie details. Need to implement selection menus now but that's it!
This commit is contained in:
+1
-1
@@ -20,7 +20,7 @@ reqwest = { version = "0.11.13", features = ["json"] }
|
|||||||
serde_yaml = "0.9.16"
|
serde_yaml = "0.9.16"
|
||||||
serde_json = "1.0.91"
|
serde_json = "1.0.91"
|
||||||
serde = { version = "1.0", features = ["derive"] }
|
serde = { version = "1.0", features = ["derive"] }
|
||||||
strum = { version = "0.24.1", features = ["derive"] }
|
strum = { version = "0.24.1", features = ["derive", "strum_macros"] }
|
||||||
tokio = { version = "1.24.1", features = ["full"] }
|
tokio = { version = "1.24.1", features = ["full"] }
|
||||||
tui = "0.19.0"
|
tui = "0.19.0"
|
||||||
urlencoding = "2.1.2"
|
urlencoding = "2.1.2"
|
||||||
|
|||||||
+51
-5
@@ -2,14 +2,13 @@ use std::collections::HashMap;
|
|||||||
use std::time::Duration;
|
use std::time::Duration;
|
||||||
|
|
||||||
use chrono::{DateTime, Utc};
|
use chrono::{DateTime, Utc};
|
||||||
use strum::EnumIter;
|
|
||||||
|
|
||||||
use crate::app::{App, Route};
|
use crate::app::{App, Route};
|
||||||
use crate::models::radarr_models::{
|
use crate::models::radarr_models::{
|
||||||
AddMovieSearchResult, Collection, CollectionMovie, Credit, DiskSpace, DownloadRecord, Movie,
|
AddMovieSearchResult, Collection, CollectionMovie, Credit, DiskSpace, DownloadRecord,
|
||||||
MovieHistoryItem, RootFolder,
|
MinimumAvailability, Monitor, Movie, MovieHistoryItem, RootFolder,
|
||||||
};
|
};
|
||||||
use crate::models::{ScrollableText, StatefulTable, TabRoute, TabState};
|
use crate::models::{ScrollableText, StatefulList, StatefulTable, TabRoute, TabState};
|
||||||
use crate::network::radarr_network::RadarrEvent;
|
use crate::network::radarr_network::RadarrEvent;
|
||||||
|
|
||||||
pub struct RadarrData {
|
pub struct RadarrData {
|
||||||
@@ -20,6 +19,10 @@ pub struct RadarrData {
|
|||||||
pub movies: StatefulTable<Movie>,
|
pub movies: StatefulTable<Movie>,
|
||||||
pub filtered_movies: StatefulTable<Movie>,
|
pub filtered_movies: StatefulTable<Movie>,
|
||||||
pub add_searched_movies: StatefulTable<AddMovieSearchResult>,
|
pub add_searched_movies: StatefulTable<AddMovieSearchResult>,
|
||||||
|
pub add_movie_monitor_list: StatefulList<Monitor>,
|
||||||
|
pub add_movie_minimum_availability_list: StatefulList<MinimumAvailability>,
|
||||||
|
pub add_movie_quality_profile_list: StatefulList<String>,
|
||||||
|
pub selected_block: ActiveRadarrBlock,
|
||||||
pub downloads: StatefulTable<DownloadRecord>,
|
pub downloads: StatefulTable<DownloadRecord>,
|
||||||
pub quality_profile_map: HashMap<u64, String>,
|
pub quality_profile_map: HashMap<u64, String>,
|
||||||
pub movie_details: ScrollableText,
|
pub movie_details: ScrollableText,
|
||||||
@@ -66,6 +69,12 @@ impl RadarrData {
|
|||||||
self.movie_info_tabs.index = 0;
|
self.movie_info_tabs.index = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn reset_add_movie_selections(&mut self) {
|
||||||
|
self.add_movie_monitor_list = StatefulList::default();
|
||||||
|
self.add_movie_minimum_availability_list = StatefulList::default();
|
||||||
|
self.add_movie_quality_profile_list = StatefulList::default();
|
||||||
|
}
|
||||||
|
|
||||||
pub fn reset_main_tab_index(&mut self) {
|
pub fn reset_main_tab_index(&mut self) {
|
||||||
self.main_tabs.index = 0;
|
self.main_tabs.index = 0;
|
||||||
}
|
}
|
||||||
@@ -80,6 +89,10 @@ impl Default for RadarrData {
|
|||||||
start_time: DateTime::default(),
|
start_time: DateTime::default(),
|
||||||
movies: StatefulTable::default(),
|
movies: StatefulTable::default(),
|
||||||
add_searched_movies: StatefulTable::default(),
|
add_searched_movies: StatefulTable::default(),
|
||||||
|
add_movie_monitor_list: StatefulList::default(),
|
||||||
|
add_movie_minimum_availability_list: StatefulList::default(),
|
||||||
|
add_movie_quality_profile_list: StatefulList::default(),
|
||||||
|
selected_block: ActiveRadarrBlock::AddMovieSelectMonitor,
|
||||||
filtered_movies: StatefulTable::default(),
|
filtered_movies: StatefulTable::default(),
|
||||||
downloads: StatefulTable::default(),
|
downloads: StatefulTable::default(),
|
||||||
quality_profile_map: HashMap::default(),
|
quality_profile_map: HashMap::default(),
|
||||||
@@ -148,11 +161,15 @@ impl Default for RadarrData {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, PartialEq, Eq, Debug, EnumIter)]
|
#[derive(Clone, PartialEq, Eq, Debug)]
|
||||||
pub enum ActiveRadarrBlock {
|
pub enum ActiveRadarrBlock {
|
||||||
AddMovieSearchInput,
|
AddMovieSearchInput,
|
||||||
AddMovieSearchResults,
|
AddMovieSearchResults,
|
||||||
AddMoviePrompt,
|
AddMoviePrompt,
|
||||||
|
AddMovieSelectMinimumAvailability,
|
||||||
|
AddMovieSelectQualityProfile,
|
||||||
|
AddMovieSelectMonitor,
|
||||||
|
AddMovieConfirmPrompt,
|
||||||
Calendar,
|
Calendar,
|
||||||
Collections,
|
Collections,
|
||||||
CollectionDetails,
|
CollectionDetails,
|
||||||
@@ -172,6 +189,35 @@ pub enum ActiveRadarrBlock {
|
|||||||
ViewMovieOverview,
|
ViewMovieOverview,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl ActiveRadarrBlock {
|
||||||
|
pub fn next_add_prompt_block(&self) -> Self {
|
||||||
|
match self {
|
||||||
|
ActiveRadarrBlock::AddMovieSelectMonitor => {
|
||||||
|
ActiveRadarrBlock::AddMovieSelectMinimumAvailability
|
||||||
|
}
|
||||||
|
ActiveRadarrBlock::AddMovieSelectMinimumAvailability => {
|
||||||
|
ActiveRadarrBlock::AddMovieSelectQualityProfile
|
||||||
|
}
|
||||||
|
ActiveRadarrBlock::AddMovieSelectQualityProfile => ActiveRadarrBlock::AddMovieConfirmPrompt,
|
||||||
|
_ => ActiveRadarrBlock::AddMovieSelectMonitor,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn previous_add_prompt_block(&self) -> Self {
|
||||||
|
match self {
|
||||||
|
ActiveRadarrBlock::AddMovieSelectMonitor => ActiveRadarrBlock::AddMovieConfirmPrompt,
|
||||||
|
ActiveRadarrBlock::AddMovieSelectMinimumAvailability => {
|
||||||
|
ActiveRadarrBlock::AddMovieSelectMonitor
|
||||||
|
}
|
||||||
|
ActiveRadarrBlock::AddMovieSelectQualityProfile => {
|
||||||
|
ActiveRadarrBlock::AddMovieSelectMinimumAvailability
|
||||||
|
}
|
||||||
|
ActiveRadarrBlock::AddMovieConfirmPrompt => ActiveRadarrBlock::AddMovieSelectQualityProfile,
|
||||||
|
_ => ActiveRadarrBlock::AddMovieSelectMonitor,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl From<ActiveRadarrBlock> for Route {
|
impl From<ActiveRadarrBlock> for Route {
|
||||||
fn from(active_radarr_block: ActiveRadarrBlock) -> Route {
|
fn from(active_radarr_block: ActiveRadarrBlock) -> Route {
|
||||||
Route::Radarr(active_radarr_block)
|
Route::Radarr(active_radarr_block)
|
||||||
|
|||||||
@@ -1,7 +1,10 @@
|
|||||||
|
use strum::IntoEnumIterator;
|
||||||
|
|
||||||
use crate::app::key_binding::DEFAULT_KEYBINDINGS;
|
use crate::app::key_binding::DEFAULT_KEYBINDINGS;
|
||||||
use crate::app::radarr::ActiveRadarrBlock;
|
use crate::app::radarr::ActiveRadarrBlock;
|
||||||
use crate::handlers::{handle_prompt_toggle, KeyEventHandler};
|
use crate::handlers::{handle_prompt_toggle, KeyEventHandler};
|
||||||
use crate::models::{Scrollable, StatefulTable};
|
use crate::models::radarr_models::{MinimumAvailability, Monitor};
|
||||||
|
use crate::models::{Route, Scrollable, StatefulTable};
|
||||||
use crate::network::radarr_network::RadarrEvent;
|
use crate::network::radarr_network::RadarrEvent;
|
||||||
use crate::{App, Key};
|
use crate::{App, Key};
|
||||||
|
|
||||||
@@ -29,44 +32,138 @@ impl<'a> KeyEventHandler<'a, ActiveRadarrBlock> for AddMovieHandler<'a> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn handle_scroll_up(&mut self) {
|
fn handle_scroll_up(&mut self) {
|
||||||
if self.active_radarr_block == &ActiveRadarrBlock::AddMovieSearchResults {
|
match self.active_radarr_block {
|
||||||
self.app.data.radarr_data.add_searched_movies.scroll_up()
|
ActiveRadarrBlock::AddMovieSearchResults => {
|
||||||
|
self.app.data.radarr_data.add_searched_movies.scroll_up()
|
||||||
|
}
|
||||||
|
ActiveRadarrBlock::AddMovieSelectMonitor => {
|
||||||
|
self.app.data.radarr_data.add_movie_monitor_list.scroll_up()
|
||||||
|
}
|
||||||
|
ActiveRadarrBlock::AddMovieSelectMinimumAvailability => self
|
||||||
|
.app
|
||||||
|
.data
|
||||||
|
.radarr_data
|
||||||
|
.add_movie_minimum_availability_list
|
||||||
|
.scroll_up(),
|
||||||
|
ActiveRadarrBlock::AddMovieSelectQualityProfile => self
|
||||||
|
.app
|
||||||
|
.data
|
||||||
|
.radarr_data
|
||||||
|
.add_movie_quality_profile_list
|
||||||
|
.scroll_up(),
|
||||||
|
ActiveRadarrBlock::AddMoviePrompt => {
|
||||||
|
self.app.data.radarr_data.selected_block = self
|
||||||
|
.app
|
||||||
|
.data
|
||||||
|
.radarr_data
|
||||||
|
.selected_block
|
||||||
|
.clone()
|
||||||
|
.previous_add_prompt_block()
|
||||||
|
}
|
||||||
|
_ => (),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn handle_scroll_down(&mut self) {
|
fn handle_scroll_down(&mut self) {
|
||||||
if self.active_radarr_block == &ActiveRadarrBlock::AddMovieSearchResults {
|
match self.active_radarr_block {
|
||||||
self.app.data.radarr_data.add_searched_movies.scroll_down()
|
ActiveRadarrBlock::AddMovieSearchResults => {
|
||||||
|
self.app.data.radarr_data.add_searched_movies.scroll_down()
|
||||||
|
}
|
||||||
|
ActiveRadarrBlock::AddMovieSelectMonitor => self
|
||||||
|
.app
|
||||||
|
.data
|
||||||
|
.radarr_data
|
||||||
|
.add_movie_monitor_list
|
||||||
|
.scroll_down(),
|
||||||
|
ActiveRadarrBlock::AddMovieSelectMinimumAvailability => self
|
||||||
|
.app
|
||||||
|
.data
|
||||||
|
.radarr_data
|
||||||
|
.add_movie_minimum_availability_list
|
||||||
|
.scroll_down(),
|
||||||
|
ActiveRadarrBlock::AddMovieSelectQualityProfile => self
|
||||||
|
.app
|
||||||
|
.data
|
||||||
|
.radarr_data
|
||||||
|
.add_movie_quality_profile_list
|
||||||
|
.scroll_down(),
|
||||||
|
ActiveRadarrBlock::AddMoviePrompt => {
|
||||||
|
self.app.data.radarr_data.selected_block = self
|
||||||
|
.app
|
||||||
|
.data
|
||||||
|
.radarr_data
|
||||||
|
.selected_block
|
||||||
|
.next_add_prompt_block()
|
||||||
|
}
|
||||||
|
_ => (),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn handle_home(&mut self) {
|
fn handle_home(&mut self) {
|
||||||
if self.active_radarr_block == &ActiveRadarrBlock::AddMovieSearchResults {
|
match self.active_radarr_block {
|
||||||
self
|
ActiveRadarrBlock::AddMovieSearchResults => self
|
||||||
.app
|
.app
|
||||||
.data
|
.data
|
||||||
.radarr_data
|
.radarr_data
|
||||||
.add_searched_movies
|
.add_searched_movies
|
||||||
.scroll_to_top()
|
.scroll_to_top(),
|
||||||
|
ActiveRadarrBlock::AddMovieSelectMonitor => self
|
||||||
|
.app
|
||||||
|
.data
|
||||||
|
.radarr_data
|
||||||
|
.add_movie_monitor_list
|
||||||
|
.scroll_to_top(),
|
||||||
|
ActiveRadarrBlock::AddMovieSelectMinimumAvailability => self
|
||||||
|
.app
|
||||||
|
.data
|
||||||
|
.radarr_data
|
||||||
|
.add_movie_minimum_availability_list
|
||||||
|
.scroll_to_top(),
|
||||||
|
ActiveRadarrBlock::AddMovieSelectQualityProfile => self
|
||||||
|
.app
|
||||||
|
.data
|
||||||
|
.radarr_data
|
||||||
|
.add_movie_quality_profile_list
|
||||||
|
.scroll_to_top(),
|
||||||
|
_ => (),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn handle_end(&mut self) {
|
fn handle_end(&mut self) {
|
||||||
if self.active_radarr_block == &ActiveRadarrBlock::AddMovieSearchResults {
|
match self.active_radarr_block {
|
||||||
self
|
ActiveRadarrBlock::AddMovieSearchResults => self
|
||||||
.app
|
.app
|
||||||
.data
|
.data
|
||||||
.radarr_data
|
.radarr_data
|
||||||
.add_searched_movies
|
.add_searched_movies
|
||||||
.scroll_to_bottom()
|
.scroll_to_bottom(),
|
||||||
|
ActiveRadarrBlock::AddMovieSelectMonitor => self
|
||||||
|
.app
|
||||||
|
.data
|
||||||
|
.radarr_data
|
||||||
|
.add_movie_monitor_list
|
||||||
|
.scroll_to_bottom(),
|
||||||
|
ActiveRadarrBlock::AddMovieSelectMinimumAvailability => self
|
||||||
|
.app
|
||||||
|
.data
|
||||||
|
.radarr_data
|
||||||
|
.add_movie_minimum_availability_list
|
||||||
|
.scroll_to_bottom(),
|
||||||
|
ActiveRadarrBlock::AddMovieSelectQualityProfile => self
|
||||||
|
.app
|
||||||
|
.data
|
||||||
|
.radarr_data
|
||||||
|
.add_movie_quality_profile_list
|
||||||
|
.scroll_to_bottom(),
|
||||||
|
_ => (),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn handle_delete(&mut self) {}
|
fn handle_delete(&mut self) {}
|
||||||
|
|
||||||
fn handle_left_right_action(&mut self) {
|
fn handle_left_right_action(&mut self) {
|
||||||
if *self.active_radarr_block == ActiveRadarrBlock::AddMoviePrompt {
|
if let ActiveRadarrBlock::AddMoviePrompt = self.active_radarr_block {
|
||||||
handle_prompt_toggle(self.app, self.key);
|
handle_prompt_toggle(self.app, self.key)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -82,15 +179,56 @@ impl<'a> KeyEventHandler<'a, ActiveRadarrBlock> for AddMovieHandler<'a> {
|
|||||||
self
|
self
|
||||||
.app
|
.app
|
||||||
.push_navigation_stack(ActiveRadarrBlock::AddMoviePrompt.into());
|
.push_navigation_stack(ActiveRadarrBlock::AddMoviePrompt.into());
|
||||||
|
self
|
||||||
|
.app
|
||||||
|
.data
|
||||||
|
.radarr_data
|
||||||
|
.add_movie_monitor_list
|
||||||
|
.set_items(Monitor::vec());
|
||||||
|
self
|
||||||
|
.app
|
||||||
|
.data
|
||||||
|
.radarr_data
|
||||||
|
.add_movie_minimum_availability_list
|
||||||
|
.set_items(MinimumAvailability::vec());
|
||||||
|
let quality_profile_names = self
|
||||||
|
.app
|
||||||
|
.data
|
||||||
|
.radarr_data
|
||||||
|
.quality_profile_map
|
||||||
|
.iter()
|
||||||
|
.map(|(_, value)| value.clone())
|
||||||
|
.collect();
|
||||||
|
self
|
||||||
|
.app
|
||||||
|
.data
|
||||||
|
.radarr_data
|
||||||
|
.add_movie_quality_profile_list
|
||||||
|
.set_items(quality_profile_names);
|
||||||
}
|
}
|
||||||
ActiveRadarrBlock::AddMoviePrompt => {
|
ActiveRadarrBlock::AddMoviePrompt => match self.app.data.radarr_data.selected_block {
|
||||||
if self.app.data.radarr_data.prompt_confirm {
|
ActiveRadarrBlock::AddMovieConfirmPrompt => {
|
||||||
self.app.data.radarr_data.prompt_confirm_action = Some(RadarrEvent::AddMovie);
|
if self.app.data.radarr_data.prompt_confirm {
|
||||||
self.app.pop_navigation_stack();
|
self.app.data.radarr_data.prompt_confirm_action = Some(RadarrEvent::AddMovie);
|
||||||
} else {
|
self.app.pop_navigation_stack();
|
||||||
self.app.pop_navigation_stack();
|
} else {
|
||||||
|
self.app.pop_navigation_stack();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
ActiveRadarrBlock::AddMovieSelectMonitor => self
|
||||||
|
.app
|
||||||
|
.push_navigation_stack(ActiveRadarrBlock::AddMovieSelectMonitor.into()),
|
||||||
|
ActiveRadarrBlock::AddMovieSelectMinimumAvailability => self
|
||||||
|
.app
|
||||||
|
.push_navigation_stack(ActiveRadarrBlock::AddMovieSelectMinimumAvailability.into()),
|
||||||
|
ActiveRadarrBlock::AddMovieSelectQualityProfile => self
|
||||||
|
.app
|
||||||
|
.push_navigation_stack(ActiveRadarrBlock::AddMovieSelectQualityProfile.into()),
|
||||||
|
_ => (),
|
||||||
|
},
|
||||||
|
ActiveRadarrBlock::AddMovieSelectMonitor
|
||||||
|
| ActiveRadarrBlock::AddMovieSelectMinimumAvailability
|
||||||
|
| ActiveRadarrBlock::AddMovieSelectQualityProfile => self.app.pop_navigation_stack(),
|
||||||
_ => (),
|
_ => (),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -109,8 +247,12 @@ impl<'a> KeyEventHandler<'a, ActiveRadarrBlock> for AddMovieHandler<'a> {
|
|||||||
}
|
}
|
||||||
ActiveRadarrBlock::AddMoviePrompt => {
|
ActiveRadarrBlock::AddMoviePrompt => {
|
||||||
self.app.pop_navigation_stack();
|
self.app.pop_navigation_stack();
|
||||||
|
self.app.data.radarr_data.reset_add_movie_selections();
|
||||||
self.app.data.radarr_data.prompt_confirm = false;
|
self.app.data.radarr_data.prompt_confirm = false;
|
||||||
}
|
}
|
||||||
|
ActiveRadarrBlock::AddMovieSelectMonitor
|
||||||
|
| ActiveRadarrBlock::AddMovieSelectMinimumAvailability
|
||||||
|
| ActiveRadarrBlock::AddMovieSelectQualityProfile => self.app.pop_navigation_stack(),
|
||||||
_ => (),
|
_ => (),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,7 +34,10 @@ impl<'a> KeyEventHandler<'a, ActiveRadarrBlock> for RadarrHandler<'a> {
|
|||||||
}
|
}
|
||||||
ActiveRadarrBlock::AddMovieSearchInput
|
ActiveRadarrBlock::AddMovieSearchInput
|
||||||
| ActiveRadarrBlock::AddMovieSearchResults
|
| ActiveRadarrBlock::AddMovieSearchResults
|
||||||
| ActiveRadarrBlock::AddMoviePrompt => {
|
| ActiveRadarrBlock::AddMoviePrompt
|
||||||
|
| ActiveRadarrBlock::AddMovieSelectMinimumAvailability
|
||||||
|
| ActiveRadarrBlock::AddMovieSelectMonitor
|
||||||
|
| ActiveRadarrBlock::AddMovieSelectQualityProfile => {
|
||||||
AddMovieHandler::with(self.key, self.app, self.active_radarr_block).handle()
|
AddMovieHandler::with(self.key, self.app, self.active_radarr_block).handle()
|
||||||
}
|
}
|
||||||
_ => self.handle_key_event(),
|
_ => self.handle_key_event(),
|
||||||
|
|||||||
+82
-1
@@ -2,7 +2,7 @@ use std::cell::RefCell;
|
|||||||
use std::fmt::{Debug, Display, Formatter};
|
use std::fmt::{Debug, Display, Formatter};
|
||||||
|
|
||||||
use serde::Deserialize;
|
use serde::Deserialize;
|
||||||
use tui::widgets::TableState;
|
use tui::widgets::{ListState, TableState};
|
||||||
|
|
||||||
use crate::app::radarr::ActiveRadarrBlock;
|
use crate::app::radarr::ActiveRadarrBlock;
|
||||||
|
|
||||||
@@ -28,6 +28,87 @@ pub trait Scrollable {
|
|||||||
fn scroll_to_bottom(&mut self);
|
fn scroll_to_bottom(&mut self);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub struct StatefulList<T> {
|
||||||
|
pub state: ListState,
|
||||||
|
pub items: Vec<T>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl<T> Default for StatefulList<T> {
|
||||||
|
fn default() -> StatefulList<T> {
|
||||||
|
StatefulList {
|
||||||
|
state: ListState::default(),
|
||||||
|
items: Vec::new(),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl<T> Scrollable for StatefulList<T> {
|
||||||
|
fn scroll_down(&mut self) {
|
||||||
|
let selected_row = match self.state.selected() {
|
||||||
|
Some(i) => {
|
||||||
|
if i >= self.items.len() - 1 {
|
||||||
|
0
|
||||||
|
} else {
|
||||||
|
i + 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
None => 0,
|
||||||
|
};
|
||||||
|
|
||||||
|
self.state.select(Some(selected_row));
|
||||||
|
}
|
||||||
|
|
||||||
|
fn scroll_up(&mut self) {
|
||||||
|
let selected_row = match self.state.selected() {
|
||||||
|
Some(i) => {
|
||||||
|
if i == 0 {
|
||||||
|
self.items.len() - 1
|
||||||
|
} else {
|
||||||
|
i - 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
None => 0,
|
||||||
|
};
|
||||||
|
|
||||||
|
self.state.select(Some(selected_row));
|
||||||
|
}
|
||||||
|
|
||||||
|
fn scroll_to_top(&mut self) {
|
||||||
|
self.state.select(Some(0));
|
||||||
|
}
|
||||||
|
|
||||||
|
fn scroll_to_bottom(&mut self) {
|
||||||
|
self.state.select(Some(self.items.len() - 1));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl<T: Clone + PartialEq + Eq + Debug> StatefulList<T> {
|
||||||
|
pub fn set_items(&mut self, items: Vec<T>) {
|
||||||
|
let items_len = items.len();
|
||||||
|
self.items = items;
|
||||||
|
if !self.items.is_empty() {
|
||||||
|
let selected_row = self.state.selected().map_or(0, |i| {
|
||||||
|
if i > 0 && i < items_len {
|
||||||
|
i
|
||||||
|
} else if i >= items_len {
|
||||||
|
items_len - 1
|
||||||
|
} else {
|
||||||
|
0
|
||||||
|
}
|
||||||
|
});
|
||||||
|
self.state.select(Some(selected_row));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn current_selection(&self) -> &T {
|
||||||
|
&self.items[self.state.selected().unwrap_or(0)]
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn current_selection_clone(&self) -> T {
|
||||||
|
self.items[self.state.selected().unwrap_or(0)].clone()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
pub struct StatefulTable<T> {
|
pub struct StatefulTable<T> {
|
||||||
pub state: TableState,
|
pub state: TableState,
|
||||||
pub items: Vec<T>,
|
pub items: Vec<T>,
|
||||||
|
|||||||
@@ -1,7 +1,10 @@
|
|||||||
|
use std::fmt::{Display, Formatter};
|
||||||
|
|
||||||
use chrono::{DateTime, Utc};
|
use chrono::{DateTime, Utc};
|
||||||
use derivative::Derivative;
|
use derivative::Derivative;
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
use serde_json::Number;
|
use serde_json::Number;
|
||||||
|
use strum::EnumIter;
|
||||||
|
|
||||||
use crate::models::HorizontallyScrollableText;
|
use crate::models::HorizontallyScrollableText;
|
||||||
|
|
||||||
@@ -223,6 +226,7 @@ pub struct AddMovieBody {
|
|||||||
#[derive(Default, Serialize, Debug, PartialEq, Eq)]
|
#[derive(Default, Serialize, Debug, PartialEq, Eq)]
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct AddOptions {
|
pub struct AddOptions {
|
||||||
|
pub monitor: String,
|
||||||
pub search_for_movie: bool,
|
pub search_for_movie: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -243,3 +247,81 @@ pub struct AddMovieSearchResult {
|
|||||||
pub runtime: Number,
|
pub runtime: Number,
|
||||||
pub ratings: RatingsList,
|
pub ratings: RatingsList,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(Default, PartialEq, Eq, Clone, Debug)]
|
||||||
|
pub enum MinimumAvailability {
|
||||||
|
Tba,
|
||||||
|
Announced,
|
||||||
|
InCinemas,
|
||||||
|
#[default]
|
||||||
|
Released,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Display for MinimumAvailability {
|
||||||
|
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
|
||||||
|
let minimum_availability = match self {
|
||||||
|
MinimumAvailability::Tba => "tba",
|
||||||
|
MinimumAvailability::Announced => "announced",
|
||||||
|
MinimumAvailability::InCinemas => "inCinemas",
|
||||||
|
MinimumAvailability::Released => "released",
|
||||||
|
};
|
||||||
|
write!(f, "{}", minimum_availability)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl MinimumAvailability {
|
||||||
|
pub fn vec() -> Vec<Self> {
|
||||||
|
vec![
|
||||||
|
MinimumAvailability::Tba,
|
||||||
|
MinimumAvailability::Announced,
|
||||||
|
MinimumAvailability::InCinemas,
|
||||||
|
MinimumAvailability::Released,
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn to_display_str(&self) -> &str {
|
||||||
|
match self {
|
||||||
|
MinimumAvailability::Tba => "TBA",
|
||||||
|
MinimumAvailability::Announced => "Announced",
|
||||||
|
MinimumAvailability::InCinemas => "In Cinemas",
|
||||||
|
MinimumAvailability::Released => "Released",
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Default, PartialEq, Eq, Clone, Debug)]
|
||||||
|
pub enum Monitor {
|
||||||
|
#[default]
|
||||||
|
MovieOnly,
|
||||||
|
MovieAndCollection,
|
||||||
|
None,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Display for Monitor {
|
||||||
|
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
|
||||||
|
let monitor = match self {
|
||||||
|
Monitor::MovieOnly => "movieOnly",
|
||||||
|
Monitor::MovieAndCollection => "movieAndCollection",
|
||||||
|
Monitor::None => "none",
|
||||||
|
};
|
||||||
|
write!(f, "{}", monitor)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Monitor {
|
||||||
|
pub fn vec() -> Vec<Self> {
|
||||||
|
vec![
|
||||||
|
Monitor::MovieOnly,
|
||||||
|
Monitor::MovieAndCollection,
|
||||||
|
Monitor::None,
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn to_display_str(&self) -> &str {
|
||||||
|
match self {
|
||||||
|
Monitor::MovieOnly => "Movie only",
|
||||||
|
Monitor::MovieAndCollection => "Movie and Collection",
|
||||||
|
Monitor::None => "None",
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -8,7 +8,8 @@ use urlencoding::encode;
|
|||||||
use crate::app::RadarrConfig;
|
use crate::app::RadarrConfig;
|
||||||
use crate::models::radarr_models::{
|
use crate::models::radarr_models::{
|
||||||
AddMovieBody, AddMovieSearchResult, AddOptions, Collection, Credit, CreditType, DiskSpace,
|
AddMovieBody, AddMovieSearchResult, AddOptions, Collection, Credit, CreditType, DiskSpace,
|
||||||
DownloadsResponse, Movie, MovieHistoryItem, QualityProfile, RootFolder, SystemStatus,
|
DownloadsResponse, MinimumAvailability, Movie, MovieHistoryItem, QualityProfile, RootFolder,
|
||||||
|
SystemStatus,
|
||||||
};
|
};
|
||||||
use crate::models::ScrollableText;
|
use crate::models::ScrollableText;
|
||||||
use crate::network::utils::get_movie_status;
|
use crate::network::utils::get_movie_status;
|
||||||
@@ -491,53 +492,64 @@ impl<'a> Network<'a> {
|
|||||||
|
|
||||||
async fn add_movie(&self) {
|
async fn add_movie(&self) {
|
||||||
info!("Adding new movie to Radarr");
|
info!("Adding new movie to Radarr");
|
||||||
let root_folders = self.app.lock().await.data.radarr_data.root_folders.to_vec();
|
let body = {
|
||||||
let current_selection = self
|
let app = self.app.lock().await;
|
||||||
.app
|
let root_folders = app.data.radarr_data.root_folders.to_vec();
|
||||||
.lock()
|
let current_selection = app
|
||||||
.await
|
.data
|
||||||
.data
|
.radarr_data
|
||||||
.radarr_data
|
.add_searched_movies
|
||||||
.add_searched_movies
|
.current_selection_clone();
|
||||||
.current_selection_clone();
|
let quality_profile_map = app.data.radarr_data.quality_profile_map.clone();
|
||||||
let quality_profile_map = self
|
|
||||||
.app
|
|
||||||
.lock()
|
|
||||||
.await
|
|
||||||
.data
|
|
||||||
.radarr_data
|
|
||||||
.quality_profile_map
|
|
||||||
.clone();
|
|
||||||
|
|
||||||
let RootFolder { path, .. } = root_folders
|
let RootFolder { path, .. } = root_folders
|
||||||
.iter()
|
.iter()
|
||||||
.filter(|folder| folder.accessible)
|
.filter(|folder| folder.accessible)
|
||||||
.reduce(|a, b| {
|
.reduce(|a, b| {
|
||||||
if a.free_space.as_u64().unwrap() > b.free_space.as_u64().unwrap() {
|
if a.free_space.as_u64().unwrap() > b.free_space.as_u64().unwrap() {
|
||||||
a
|
a
|
||||||
} else {
|
} else {
|
||||||
b
|
b
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.unwrap();
|
.unwrap();
|
||||||
let AddMovieSearchResult { tmdb_id, title, .. } = current_selection;
|
let monitor = app
|
||||||
let quality_profile_id = quality_profile_map
|
.data
|
||||||
.iter()
|
.radarr_data
|
||||||
.filter(|(_, value)| value.to_lowercase() == "any")
|
.add_movie_monitor_list
|
||||||
.map(|(key, _)| key)
|
.current_selection()
|
||||||
.next()
|
.to_string();
|
||||||
.unwrap();
|
let minimum_availability = app
|
||||||
|
.data
|
||||||
|
.radarr_data
|
||||||
|
.add_movie_minimum_availability_list
|
||||||
|
.current_selection()
|
||||||
|
.to_string();
|
||||||
|
let quality_profile = app
|
||||||
|
.data
|
||||||
|
.radarr_data
|
||||||
|
.add_movie_quality_profile_list
|
||||||
|
.current_selection_clone();
|
||||||
|
let AddMovieSearchResult { tmdb_id, title, .. } = current_selection;
|
||||||
|
let quality_profile_id = quality_profile_map
|
||||||
|
.iter()
|
||||||
|
.filter(|(_, value)| **value == quality_profile)
|
||||||
|
.map(|(key, _)| key)
|
||||||
|
.next()
|
||||||
|
.unwrap();
|
||||||
|
|
||||||
let body = AddMovieBody {
|
AddMovieBody {
|
||||||
tmdb_id: tmdb_id.as_u64().unwrap(),
|
tmdb_id: tmdb_id.as_u64().unwrap(),
|
||||||
title: title.to_owned(),
|
title,
|
||||||
root_folder_path: path.to_owned(),
|
root_folder_path: path.to_owned(),
|
||||||
minimum_availability: "released".to_owned(),
|
minimum_availability,
|
||||||
monitored: true,
|
monitored: true,
|
||||||
quality_profile_id: *quality_profile_id,
|
quality_profile_id: *quality_profile_id,
|
||||||
add_options: AddOptions {
|
add_options: AddOptions {
|
||||||
search_for_movie: true,
|
monitor,
|
||||||
},
|
search_for_movie: true,
|
||||||
|
},
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
debug!("Add movie body: {:?}", body);
|
debug!("Add movie body: {:?}", body);
|
||||||
|
|||||||
@@ -299,3 +299,30 @@ pub fn draw_button<B: Backend>(f: &mut Frame<'_, B>, area: Rect, label: &str, is
|
|||||||
|
|
||||||
f.render_widget(label_paragraph, area);
|
f.render_widget(label_paragraph, area);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn draw_drop_down_menu<B: Backend>(
|
||||||
|
f: &mut Frame<'_, B>,
|
||||||
|
area: Rect,
|
||||||
|
description: &str,
|
||||||
|
selection: &str,
|
||||||
|
is_selected: bool,
|
||||||
|
) {
|
||||||
|
let horizontal_chunks = horizontal_chunks(
|
||||||
|
vec![Constraint::Percentage(50), Constraint::Percentage(50)],
|
||||||
|
area,
|
||||||
|
);
|
||||||
|
|
||||||
|
let description_paragraph = Paragraph::new(Text::from(format!("\n{}: ", description)))
|
||||||
|
.block(borderless_block())
|
||||||
|
.alignment(Alignment::Right)
|
||||||
|
.style(style_primary());
|
||||||
|
|
||||||
|
f.render_widget(description_paragraph, horizontal_chunks[0]);
|
||||||
|
|
||||||
|
draw_button(
|
||||||
|
f,
|
||||||
|
horizontal_chunks[1],
|
||||||
|
format!("{} ▼", selection).as_str(),
|
||||||
|
is_selected,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,16 +1,21 @@
|
|||||||
use tui::backend::Backend;
|
use tui::backend::Backend;
|
||||||
use tui::layout::{Alignment, Constraint, Rect};
|
use tui::layout::{Alignment, Constraint, Rect};
|
||||||
|
use tui::style::Modifier;
|
||||||
use tui::text::Text;
|
use tui::text::Text;
|
||||||
use tui::widgets::{Cell, Paragraph, Row};
|
use tui::widgets::{Cell, Paragraph, Row, Wrap};
|
||||||
use tui::Frame;
|
use tui::Frame;
|
||||||
|
|
||||||
use crate::app::radarr::ActiveRadarrBlock;
|
use crate::app::radarr::ActiveRadarrBlock;
|
||||||
|
use crate::models::radarr_models::Monitor;
|
||||||
use crate::models::Route;
|
use crate::models::Route;
|
||||||
use crate::ui::utils::{
|
use crate::ui::utils::{
|
||||||
borderless_block, layout_block, show_cursor, style_default, style_help, style_primary,
|
borderless_block, horizontal_chunks, layout_block, show_cursor, style_default, style_help,
|
||||||
title_block_centered, vertical_chunks_with_margin,
|
style_primary, title_block_centered, vertical_chunks_with_margin,
|
||||||
|
};
|
||||||
|
use crate::ui::{
|
||||||
|
draw_button, draw_drop_down_menu, draw_medium_popup_over, draw_prompt_box, draw_small_popup_over,
|
||||||
|
draw_table, TableProps,
|
||||||
};
|
};
|
||||||
use crate::ui::{draw_medium_popup_over, draw_prompt_box, draw_table, TableProps};
|
|
||||||
use crate::utils::convert_runtime;
|
use crate::utils::convert_runtime;
|
||||||
use crate::App;
|
use crate::App;
|
||||||
|
|
||||||
@@ -147,31 +152,129 @@ fn draw_add_movie_search<B: Backend>(f: &mut Frame<'_, B>, app: &mut App, area:
|
|||||||
f.render_widget(search_paragraph, chunks[0]);
|
f.render_widget(search_paragraph, chunks[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn draw_add_movie_confirmation_popup<B: Backend>(
|
||||||
|
f: &mut Frame<'_, B>,
|
||||||
|
app: &mut App,
|
||||||
|
prompt_area: Rect,
|
||||||
|
) {
|
||||||
|
if let Route::Radarr(active_radarr_block) = app.get_current_route().clone() {
|
||||||
|
match active_radarr_block {
|
||||||
|
ActiveRadarrBlock::AddMovieSelectMonitor => {
|
||||||
|
// draw_small_popup_over(f, app, prompt_area, draw_add_movie_confirmation_prompt, draw_add_movie_select_monitor);
|
||||||
|
}
|
||||||
|
ActiveRadarrBlock::AddMovieSelectMinimumAvailability => {
|
||||||
|
// draw_small_popup_over(f, app, prompt_area, draw_add_movie_confirmation_prompt, draw_add_movie_select_minimum_availability);
|
||||||
|
}
|
||||||
|
ActiveRadarrBlock::AddMovieSelectQualityProfile => {
|
||||||
|
// draw_small_popup_over(f, app, prompt_area, draw_add_movie_confirmation_prompt, draw_add_movie_select_quality_profile);
|
||||||
|
}
|
||||||
|
ActiveRadarrBlock::AddMoviePrompt => draw_add_movie_confirmation_prompt(f, app, prompt_area),
|
||||||
|
_ => (),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
fn draw_add_movie_confirmation_prompt<B: Backend>(
|
fn draw_add_movie_confirmation_prompt<B: Backend>(
|
||||||
f: &mut Frame<'_, B>,
|
f: &mut Frame<'_, B>,
|
||||||
app: &mut App,
|
app: &mut App,
|
||||||
prompt_area: Rect,
|
prompt_area: Rect,
|
||||||
) {
|
) {
|
||||||
draw_prompt_box(
|
let title = " Confirm Add Movie? ";
|
||||||
f,
|
let prompt = format!(
|
||||||
|
"{}:\n\n{}",
|
||||||
|
app
|
||||||
|
.data
|
||||||
|
.radarr_data
|
||||||
|
.add_searched_movies
|
||||||
|
.current_selection()
|
||||||
|
.title,
|
||||||
|
app
|
||||||
|
.data
|
||||||
|
.radarr_data
|
||||||
|
.add_searched_movies
|
||||||
|
.current_selection()
|
||||||
|
.overview
|
||||||
|
);
|
||||||
|
let yes_no_value = &app.data.radarr_data.prompt_confirm;
|
||||||
|
let selected_block = &app.data.radarr_data.selected_block;
|
||||||
|
let highlight_yes_no = *selected_block == ActiveRadarrBlock::AddMovieConfirmPrompt;
|
||||||
|
|
||||||
|
let selected_monitor = app
|
||||||
|
.data
|
||||||
|
.radarr_data
|
||||||
|
.add_movie_monitor_list
|
||||||
|
.current_selection();
|
||||||
|
let selected_minimum_availability = app
|
||||||
|
.data
|
||||||
|
.radarr_data
|
||||||
|
.add_movie_minimum_availability_list
|
||||||
|
.current_selection();
|
||||||
|
let selected_quality_profile = app
|
||||||
|
.data
|
||||||
|
.radarr_data
|
||||||
|
.add_movie_quality_profile_list
|
||||||
|
.current_selection();
|
||||||
|
|
||||||
|
f.render_widget(title_block_centered(title), prompt_area);
|
||||||
|
|
||||||
|
let chunks = vertical_chunks_with_margin(
|
||||||
|
vec![
|
||||||
|
Constraint::Percentage(40),
|
||||||
|
Constraint::Length(3),
|
||||||
|
Constraint::Length(3),
|
||||||
|
Constraint::Length(3),
|
||||||
|
Constraint::Min(5),
|
||||||
|
Constraint::Length(3),
|
||||||
|
],
|
||||||
prompt_area,
|
prompt_area,
|
||||||
" Confirm Add Movie? ",
|
1,
|
||||||
format!(
|
);
|
||||||
"{}:\n\n{}",
|
|
||||||
app
|
let prompt_paragraph = Paragraph::new(Text::from(prompt))
|
||||||
.data
|
.block(borderless_block())
|
||||||
.radarr_data
|
.style(style_primary().add_modifier(Modifier::BOLD))
|
||||||
.add_searched_movies
|
.wrap(Wrap { trim: false })
|
||||||
.current_selection()
|
.alignment(Alignment::Center);
|
||||||
.title,
|
f.render_widget(prompt_paragraph, chunks[0]);
|
||||||
app
|
|
||||||
.data
|
let horizontal_chunks = horizontal_chunks(
|
||||||
.radarr_data
|
vec![Constraint::Percentage(50), Constraint::Percentage(50)],
|
||||||
.add_searched_movies
|
chunks[5],
|
||||||
.current_selection()
|
);
|
||||||
.overview
|
|
||||||
)
|
draw_drop_down_menu(
|
||||||
.as_str(),
|
f,
|
||||||
&app.data.radarr_data.prompt_confirm,
|
chunks[1],
|
||||||
|
"Monitor",
|
||||||
|
selected_monitor.to_display_str(),
|
||||||
|
*selected_block == ActiveRadarrBlock::AddMovieSelectMonitor,
|
||||||
|
);
|
||||||
|
|
||||||
|
draw_drop_down_menu(
|
||||||
|
f,
|
||||||
|
chunks[2],
|
||||||
|
"Minimum Availability",
|
||||||
|
selected_minimum_availability.to_display_str(),
|
||||||
|
*selected_block == ActiveRadarrBlock::AddMovieSelectMinimumAvailability,
|
||||||
|
);
|
||||||
|
draw_drop_down_menu(
|
||||||
|
f,
|
||||||
|
chunks[3],
|
||||||
|
"Quality Profile",
|
||||||
|
selected_quality_profile,
|
||||||
|
*selected_block == ActiveRadarrBlock::AddMovieSelectQualityProfile,
|
||||||
|
);
|
||||||
|
|
||||||
|
draw_button(
|
||||||
|
f,
|
||||||
|
horizontal_chunks[0],
|
||||||
|
"Yes",
|
||||||
|
*yes_no_value && highlight_yes_no,
|
||||||
|
);
|
||||||
|
draw_button(
|
||||||
|
f,
|
||||||
|
horizontal_chunks[1],
|
||||||
|
"No",
|
||||||
|
!*yes_no_value && highlight_yes_no,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,14 +6,14 @@ use tui::backend::Backend;
|
|||||||
use tui::layout::{Alignment, Constraint, Rect};
|
use tui::layout::{Alignment, Constraint, Rect};
|
||||||
use tui::style::{Color, Style};
|
use tui::style::{Color, Style};
|
||||||
use tui::text::Text;
|
use tui::text::Text;
|
||||||
use tui::widgets::{Block, Cell, Paragraph, Row};
|
use tui::widgets::{Cell, Paragraph, Row};
|
||||||
use tui::Frame;
|
use tui::Frame;
|
||||||
|
|
||||||
use crate::app::radarr::{ActiveRadarrBlock, RadarrData};
|
use crate::app::radarr::{ActiveRadarrBlock, RadarrData};
|
||||||
use crate::app::App;
|
use crate::app::App;
|
||||||
use crate::logos::RADARR_LOGO;
|
use crate::logos::RADARR_LOGO;
|
||||||
use crate::models::radarr_models::{AddMovieSearchResult, DiskSpace, DownloadRecord, Movie};
|
use crate::models::radarr_models::{DiskSpace, DownloadRecord, Movie};
|
||||||
use crate::models::{Route, StatefulTable};
|
use crate::models::Route;
|
||||||
use crate::ui::radarr_ui::add_movie_ui::draw_add_movie_search_popup;
|
use crate::ui::radarr_ui::add_movie_ui::draw_add_movie_search_popup;
|
||||||
use crate::ui::radarr_ui::collection_details_ui::draw_collection_details_popup;
|
use crate::ui::radarr_ui::collection_details_ui::draw_collection_details_popup;
|
||||||
use crate::ui::radarr_ui::movie_details_ui::draw_movie_info;
|
use crate::ui::radarr_ui::movie_details_ui::draw_movie_info;
|
||||||
@@ -64,7 +64,10 @@ pub(super) fn draw_radarr_ui<B: Backend>(f: &mut Frame<'_, B>, app: &mut App, ar
|
|||||||
}
|
}
|
||||||
ActiveRadarrBlock::AddMovieSearchInput
|
ActiveRadarrBlock::AddMovieSearchInput
|
||||||
| ActiveRadarrBlock::AddMovieSearchResults
|
| ActiveRadarrBlock::AddMovieSearchResults
|
||||||
| ActiveRadarrBlock::AddMoviePrompt => draw_large_popup_over(
|
| ActiveRadarrBlock::AddMoviePrompt
|
||||||
|
| ActiveRadarrBlock::AddMovieSelectMonitor
|
||||||
|
| ActiveRadarrBlock::AddMovieSelectMinimumAvailability
|
||||||
|
| ActiveRadarrBlock::AddMovieSelectQualityProfile => draw_large_popup_over(
|
||||||
f,
|
f,
|
||||||
app,
|
app,
|
||||||
content_rect,
|
content_rect,
|
||||||
@@ -168,7 +171,7 @@ fn draw_delete_movie_prompt<B: Backend>(f: &mut Frame<'_, B>, app: &mut App, pro
|
|||||||
prompt_area,
|
prompt_area,
|
||||||
" Confirm Delete Movie? ",
|
" Confirm Delete Movie? ",
|
||||||
format!(
|
format!(
|
||||||
"Do you really want to delete {}?",
|
"Do you really want to delete: {}?",
|
||||||
app.data.radarr_data.movies.current_selection().title
|
app.data.radarr_data.movies.current_selection().title
|
||||||
)
|
)
|
||||||
.as_str(),
|
.as_str(),
|
||||||
|
|||||||
Reference in New Issue
Block a user