mirror of
https://github.com/Radarr/Radarr.git
synced 2024-09-17 15:02:34 +02:00
parent
b97e6977fb
commit
5982731ef7
@ -278,7 +278,10 @@ class MovieIndex extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onSearchConfirmed = () => {
|
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 });
|
this.setState({ isConfirmSearchModalOpen: false });
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -341,6 +344,9 @@ class MovieIndex extends Component {
|
|||||||
const isLoaded = !!(!error && isPopulated && items.length && scroller);
|
const isLoaded = !!(!error && isPopulated && items.length && scroller);
|
||||||
const hasNoMovie = !totalItems;
|
const hasNoMovie = !totalItems;
|
||||||
|
|
||||||
|
const searchIndexLabel = selectedFilterKey === 'all' ? 'Search All' : 'Search Filtered';
|
||||||
|
const searchEditorLabel = selectedMovieIds.length > 0 ? 'Search Selected' : 'Search All';
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<PageContent>
|
<PageContent>
|
||||||
<PageToolbar>
|
<PageToolbar>
|
||||||
@ -365,7 +371,7 @@ class MovieIndex extends Component {
|
|||||||
<PageToolbarSeparator />
|
<PageToolbarSeparator />
|
||||||
|
|
||||||
<PageToolbarButton
|
<PageToolbarButton
|
||||||
label={selectedFilterKey === 'all' ? 'Search All' : 'Search Filtered'}
|
label={isMovieEditorActive ? searchEditorLabel : searchIndexLabel}
|
||||||
iconName={icons.SEARCH}
|
iconName={icons.SEARCH}
|
||||||
isDisabled={isSearchingMovies || !items.length}
|
isDisabled={isSearchingMovies || !items.length}
|
||||||
onPress={this.onSearchPress}
|
onPress={this.onSearchPress}
|
||||||
@ -578,7 +584,7 @@ class MovieIndex extends Component {
|
|||||||
message={
|
message={
|
||||||
<div>
|
<div>
|
||||||
<div>
|
<div>
|
||||||
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?
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
This cannot be cancelled once started without restarting Radarr.
|
This cannot be cancelled once started without restarting Radarr.
|
||||||
|
Loading…
Reference in New Issue
Block a user