From 5982731ef77e0cdd19a8df6dbfd124c70fbe6e1e Mon Sep 17 00:00:00 2001 From: Qstick Date: Sat, 4 Jul 2020 22:30:23 -0400 Subject: [PATCH] New: Search Selected from Movie Editor Fixes #4130 --- frontend/src/Movie/Index/MovieIndex.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/frontend/src/Movie/Index/MovieIndex.js b/frontend/src/Movie/Index/MovieIndex.js index a9310f0d5..3a4b369b4 100644 --- a/frontend/src/Movie/Index/MovieIndex.js +++ b/frontend/src/Movie/Index/MovieIndex.js @@ -278,7 +278,10 @@ class MovieIndex extends Component { } onSearchConfirmed = () => { - this.props.onSearchPress(this.state.searchType, this.props.items.map((m) => m.id)); + const selectedMovieIds = this.getSelectedIds(); + const searchIds = this.state.isMovieEditorActive && selectedMovieIds.length > 0 ? selectedMovieIds : this.props.items.map((m) => m.id); + + this.props.onSearchPress(this.state.searchType, searchIds); this.setState({ isConfirmSearchModalOpen: false }); } @@ -341,6 +344,9 @@ class MovieIndex extends Component { const isLoaded = !!(!error && isPopulated && items.length && scroller); const hasNoMovie = !totalItems; + const searchIndexLabel = selectedFilterKey === 'all' ? 'Search All' : 'Search Filtered'; + const searchEditorLabel = selectedMovieIds.length > 0 ? 'Search Selected' : 'Search All'; + return ( @@ -365,7 +371,7 @@ class MovieIndex extends Component {
- Are you sure you want to perform mass movie search for {this.props.items.length} movies? + Are you sure you want to perform mass movie search for {isMovieEditorActive && selectedMovieIds.length > 0 ? selectedMovieIds.length : this.props.items.length} movies?
This cannot be cancelled once started without restarting Radarr.