mirror of
https://github.com/Radarr/Radarr.git
synced 2026-04-17 21:26:22 -04:00
New: Refresh Selected in Editor Mode
This commit is contained in:
@@ -281,6 +281,13 @@ class MovieIndex extends Component {
|
||||
this.setState({ isConfirmSearchModalOpen: true, searchType: 'moviesSearch' });
|
||||
}
|
||||
|
||||
onRefreshMoviePress = () => {
|
||||
const selectedMovieIds = this.getSelectedIds();
|
||||
const refreshIds = this.state.isMovieEditorActive && selectedMovieIds.length > 0 ? selectedMovieIds : [];
|
||||
|
||||
this.props.onRefreshMoviePress(refreshIds);
|
||||
}
|
||||
|
||||
onSearchConfirmed = () => {
|
||||
const selectedMovieIds = this.getSelectedIds();
|
||||
const searchIds = this.state.isMovieEditorActive && selectedMovieIds.length > 0 ? selectedMovieIds : this.props.items.map((m) => m.id);
|
||||
@@ -356,12 +363,12 @@ class MovieIndex extends Component {
|
||||
<PageToolbar>
|
||||
<PageToolbarSection>
|
||||
<PageToolbarButton
|
||||
label="Update all"
|
||||
label={isMovieEditorActive && selectedMovieIds.length > 0 ? 'Update Selected' : 'Update All'}
|
||||
iconName={icons.REFRESH}
|
||||
spinningName={icons.REFRESH}
|
||||
isSpinning={isRefreshingMovie}
|
||||
isDisabled={hasNoMovie}
|
||||
onPress={onRefreshMoviePress}
|
||||
onPress={this.onRefreshMoviePress}
|
||||
/>
|
||||
|
||||
<PageToolbarButton
|
||||
|
||||
@@ -69,9 +69,10 @@ function createMapDispatchToProps(dispatch, props) {
|
||||
dispatch(saveMovieEditor(payload));
|
||||
},
|
||||
|
||||
onRefreshMoviePress() {
|
||||
onRefreshMoviePress(items) {
|
||||
dispatch(executeCommand({
|
||||
name: commandNames.REFRESH_MOVIE
|
||||
name: commandNames.REFRESH_MOVIE,
|
||||
movieIds: items
|
||||
}));
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user