New: Seach All/Filtered on Index

This commit is contained in:
Qstick 2020-04-03 15:51:03 -04:00
parent fb7bd4f14f
commit fac49c1da3
2 changed files with 12 additions and 10 deletions

View File

@ -26,7 +26,6 @@ import MovieIndexOverviewOptionsModal from './Overview/Options/MovieIndexOvervie
import MovieIndexOverviewsConnector from './Overview/MovieIndexOverviewsConnector'; import MovieIndexOverviewsConnector from './Overview/MovieIndexOverviewsConnector';
import MovieIndexFilterMenu from './Menus/MovieIndexFilterMenu'; import MovieIndexFilterMenu from './Menus/MovieIndexFilterMenu';
import MovieIndexSortMenu from './Menus/MovieIndexSortMenu'; import MovieIndexSortMenu from './Menus/MovieIndexSortMenu';
import MovieIndexSearchMenu from './Menus/MovieIndexSearchMenu';
import MovieIndexViewMenu from './Menus/MovieIndexViewMenu'; import MovieIndexViewMenu from './Menus/MovieIndexViewMenu';
import MovieIndexFooterConnector from './MovieIndexFooterConnector'; import MovieIndexFooterConnector from './MovieIndexFooterConnector';
import MovieEditorFooter from 'Movie/Editor/MovieEditorFooter.js'; import MovieEditorFooter from 'Movie/Editor/MovieEditorFooter.js';
@ -274,12 +273,12 @@ class MovieIndex extends Component {
} }
} }
onSearchPress = (command) => { onSearchPress = () => {
this.setState({ isConfirmSearchModalOpen: true, searchType: command }); this.setState({ isConfirmSearchModalOpen: true, searchType: 'moviesSearch' });
} }
onSearchConfirmed = () => { onSearchConfirmed = () => {
this.props.onSearchPress(this.state.searchType); this.props.onSearchPress(this.state.searchType, this.props.items.map((m) => m.id));
this.setState({ isConfirmSearchModalOpen: false }); this.setState({ isConfirmSearchModalOpen: false });
} }
@ -365,9 +364,11 @@ class MovieIndex extends Component {
<PageToolbarSeparator /> <PageToolbarSeparator />
<MovieIndexSearchMenu <PageToolbarButton
isDisabled={isSearchingMovies} label={selectedFilterKey === 'all' ? 'Search All' : 'Search Filtered'}
onSearchPress={this.onSearchPress} iconName={icons.SEARCH}
isDisabled={isSearchingMovies || !items.length}
onPress={this.onSearchPress}
/> />
<PageToolbarButton <PageToolbarButton
@ -577,7 +578,7 @@ class MovieIndex extends Component {
message={ message={
<div> <div>
<div> <div>
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?
</div> </div>
<div> <div>
This cannot be cancelled once started without restarting Radarr. This cannot be cancelled once started without restarting Radarr.

View File

@ -81,9 +81,10 @@ function createMapDispatchToProps(dispatch, props) {
})); }));
}, },
onSearchPress(command) { onSearchPress(command, items) {
dispatch(executeCommand({ dispatch(executeCommand({
name: command name: command,
movieIds: items
})); }));
} }
}; };