From fac49c1da35614d57a4e1a098fda7984704360aa Mon Sep 17 00:00:00 2001 From: Qstick Date: Fri, 3 Apr 2020 15:51:03 -0400 Subject: [PATCH] New: Seach All/Filtered on Index --- frontend/src/Movie/Index/MovieIndex.js | 17 +++++++++-------- frontend/src/Movie/Index/MovieIndexConnector.js | 5 +++-- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/frontend/src/Movie/Index/MovieIndex.js b/frontend/src/Movie/Index/MovieIndex.js index 600872205..82b96489e 100644 --- a/frontend/src/Movie/Index/MovieIndex.js +++ b/frontend/src/Movie/Index/MovieIndex.js @@ -26,7 +26,6 @@ import MovieIndexOverviewOptionsModal from './Overview/Options/MovieIndexOvervie import MovieIndexOverviewsConnector from './Overview/MovieIndexOverviewsConnector'; import MovieIndexFilterMenu from './Menus/MovieIndexFilterMenu'; import MovieIndexSortMenu from './Menus/MovieIndexSortMenu'; -import MovieIndexSearchMenu from './Menus/MovieIndexSearchMenu'; import MovieIndexViewMenu from './Menus/MovieIndexViewMenu'; import MovieIndexFooterConnector from './MovieIndexFooterConnector'; import MovieEditorFooter from 'Movie/Editor/MovieEditorFooter.js'; @@ -274,12 +273,12 @@ class MovieIndex extends Component { } } - onSearchPress = (command) => { - this.setState({ isConfirmSearchModalOpen: true, searchType: command }); + onSearchPress = () => { + this.setState({ isConfirmSearchModalOpen: true, searchType: 'moviesSearch' }); } onSearchConfirmed = () => { - this.props.onSearchPress(this.state.searchType); + this.props.onSearchPress(this.state.searchType, this.props.items.map((m) => m.id)); this.setState({ isConfirmSearchModalOpen: false }); } @@ -365,9 +364,11 @@ class MovieIndex extends Component { -
- Are you sure you want to perform mass movie search? + Are you sure you want to perform mass movie search for {this.props.items.length} movies?
This cannot be cancelled once started without restarting Radarr. diff --git a/frontend/src/Movie/Index/MovieIndexConnector.js b/frontend/src/Movie/Index/MovieIndexConnector.js index 0ac169a73..d2c6c1303 100644 --- a/frontend/src/Movie/Index/MovieIndexConnector.js +++ b/frontend/src/Movie/Index/MovieIndexConnector.js @@ -81,9 +81,10 @@ function createMapDispatchToProps(dispatch, props) { })); }, - onSearchPress(command) { + onSearchPress(command, items) { dispatch(executeCommand({ - name: command + name: command, + movieIds: items })); } };