Implemented the ability to edit collections and fixed a refresh bug so screens will automatically refresh when users edit movies or collections
This commit is contained in:
@@ -28,7 +28,7 @@ pub(super) fn draw_edit_movie_prompt<B: Backend>(
|
||||
f,
|
||||
app,
|
||||
prompt_area,
|
||||
draw_edit_confirmation_prompt,
|
||||
draw_edit_movie_confirmation_prompt,
|
||||
draw_select_minimum_availability_popup,
|
||||
);
|
||||
}
|
||||
@@ -37,40 +37,61 @@ pub(super) fn draw_edit_movie_prompt<B: Backend>(
|
||||
f,
|
||||
app,
|
||||
prompt_area,
|
||||
draw_edit_confirmation_prompt,
|
||||
draw_edit_movie_confirmation_prompt,
|
||||
draw_select_quality_profile_popup,
|
||||
);
|
||||
}
|
||||
ActiveRadarrBlock::EditMoviePrompt
|
||||
| ActiveRadarrBlock::EditMovieToggleMonitored
|
||||
| ActiveRadarrBlock::EditMoviePathInput
|
||||
| ActiveRadarrBlock::EditMovieTagsInput => draw_edit_confirmation_prompt(f, app, prompt_area),
|
||||
| ActiveRadarrBlock::EditMovieTagsInput => {
|
||||
draw_edit_movie_confirmation_prompt(f, app, prompt_area)
|
||||
}
|
||||
_ => (),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn draw_edit_confirmation_prompt<B: Backend>(
|
||||
fn draw_edit_movie_confirmation_prompt<B: Backend>(
|
||||
f: &mut Frame<'_, B>,
|
||||
app: &mut App,
|
||||
prompt_area: Rect,
|
||||
) {
|
||||
let (movie_title, movie_overview) = (
|
||||
app
|
||||
.data
|
||||
.radarr_data
|
||||
.movies
|
||||
.current_selection()
|
||||
.title
|
||||
.to_string(),
|
||||
app
|
||||
.data
|
||||
.radarr_data
|
||||
.movies
|
||||
.current_selection()
|
||||
.overview
|
||||
.clone(),
|
||||
);
|
||||
let (movie_title, movie_overview) = if app.data.radarr_data.filtered_movies.items.is_empty() {
|
||||
(
|
||||
app
|
||||
.data
|
||||
.radarr_data
|
||||
.movies
|
||||
.current_selection()
|
||||
.title
|
||||
.to_string(),
|
||||
app
|
||||
.data
|
||||
.radarr_data
|
||||
.movies
|
||||
.current_selection()
|
||||
.overview
|
||||
.clone(),
|
||||
)
|
||||
} else {
|
||||
(
|
||||
app
|
||||
.data
|
||||
.radarr_data
|
||||
.filtered_movies
|
||||
.current_selection()
|
||||
.title
|
||||
.to_string(),
|
||||
app
|
||||
.data
|
||||
.radarr_data
|
||||
.filtered_movies
|
||||
.current_selection()
|
||||
.overview
|
||||
.clone(),
|
||||
)
|
||||
};
|
||||
let title = format!("Edit - {}", movie_title);
|
||||
let yes_no_value = &app.data.radarr_data.prompt_confirm;
|
||||
let selected_block = &app.data.radarr_data.selected_block;
|
||||
@@ -79,12 +100,12 @@ fn draw_edit_confirmation_prompt<B: Backend>(
|
||||
let selected_minimum_availability = app
|
||||
.data
|
||||
.radarr_data
|
||||
.movie_minimum_availability_list
|
||||
.minimum_availability_list
|
||||
.current_selection();
|
||||
let selected_quality_profile = app
|
||||
.data
|
||||
.radarr_data
|
||||
.movie_quality_profile_list
|
||||
.quality_profile_list
|
||||
.current_selection();
|
||||
|
||||
f.render_widget(title_block_centered(&title), prompt_area);
|
||||
|
||||
Reference in New Issue
Block a user