1
0
mirror of https://github.com/Radarr/Radarr.git synced 2026-04-18 21:35:51 -04:00

New: Refresh Selected in Editor Mode

This commit is contained in:
Qstick
2020-07-09 12:30:34 -04:00
parent 135251ec31
commit aa6c8f493e
7 changed files with 47 additions and 32 deletions

View File

@@ -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

View File

@@ -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
}));
},