mirror of
https://github.com/Radarr/Radarr.git
synced 2024-09-11 20:12:41 +02:00
Fixed: Persist SearchOnAdd setting value in local cache
This commit is contained in:
parent
2d9c77ec5e
commit
9fbc1df74c
@ -17,30 +17,15 @@ import styles from './AddNewMovieModalContent.css';
|
||||
|
||||
class AddNewMovieModalContent extends Component {
|
||||
|
||||
//
|
||||
// Lifecycle
|
||||
|
||||
constructor(props, context) {
|
||||
super(props, context);
|
||||
|
||||
this.state = {
|
||||
searchForMovie: false
|
||||
};
|
||||
}
|
||||
|
||||
//
|
||||
// Listeners
|
||||
|
||||
onSearchForMissingMovieChange = ({ value }) => {
|
||||
this.setState({ searchForMovie: value });
|
||||
}
|
||||
|
||||
onQualityProfileIdChange = ({ value }) => {
|
||||
this.props.onInputChange({ name: 'qualityProfileId', value: parseInt(value) });
|
||||
}
|
||||
|
||||
onAddMoviePress = () => {
|
||||
this.props.onAddMoviePress(this.state.searchForMovie);
|
||||
this.props.onAddMoviePress();
|
||||
}
|
||||
|
||||
//
|
||||
@ -57,6 +42,7 @@ class AddNewMovieModalContent extends Component {
|
||||
monitor,
|
||||
qualityProfileId,
|
||||
minimumAvailability,
|
||||
searchForMovie,
|
||||
folder,
|
||||
tags,
|
||||
isSmallScreen,
|
||||
@ -175,8 +161,8 @@ class AddNewMovieModalContent extends Component {
|
||||
containerClassName={styles.searchForMissingMovieContainer}
|
||||
className={styles.searchForMissingMovieInput}
|
||||
name="searchForMovie"
|
||||
value={this.state.searchForMovie}
|
||||
onChange={this.onSearchForMissingMovieChange}
|
||||
onChange={onInputChange}
|
||||
{...searchForMovie}
|
||||
/>
|
||||
</label>
|
||||
|
||||
@ -205,6 +191,7 @@ AddNewMovieModalContent.propTypes = {
|
||||
monitor: PropTypes.object.isRequired,
|
||||
qualityProfileId: PropTypes.object,
|
||||
minimumAvailability: PropTypes.object.isRequired,
|
||||
searchForMovie: PropTypes.object.isRequired,
|
||||
folder: PropTypes.string.isRequired,
|
||||
tags: PropTypes.object.isRequired,
|
||||
isSmallScreen: PropTypes.bool.isRequired,
|
||||
|
@ -53,13 +53,14 @@ class AddNewMovieModalContentConnector extends Component {
|
||||
this.props.setAddMovieDefault({ [name]: value });
|
||||
}
|
||||
|
||||
onAddMoviePress = (searchForMovie) => {
|
||||
onAddMoviePress = () => {
|
||||
const {
|
||||
tmdbId,
|
||||
rootFolderPath,
|
||||
monitor,
|
||||
qualityProfileId,
|
||||
minimumAvailability,
|
||||
searchForMovie,
|
||||
tags
|
||||
} = this.props;
|
||||
|
||||
@ -69,8 +70,8 @@ class AddNewMovieModalContentConnector extends Component {
|
||||
monitor: monitor.value,
|
||||
qualityProfileId: qualityProfileId.value,
|
||||
minimumAvailability: minimumAvailability.value,
|
||||
tags: tags.value,
|
||||
searchForMovie
|
||||
searchForMovie: searchForMovie.value,
|
||||
tags: tags.value
|
||||
});
|
||||
}
|
||||
|
||||
@ -94,6 +95,7 @@ AddNewMovieModalContentConnector.propTypes = {
|
||||
monitor: PropTypes.object.isRequired,
|
||||
qualityProfileId: PropTypes.object,
|
||||
minimumAvailability: PropTypes.object.isRequired,
|
||||
searchForMovie: PropTypes.object.isRequired,
|
||||
tags: PropTypes.object.isRequired,
|
||||
onModalClose: PropTypes.func.isRequired,
|
||||
setAddMovieDefault: PropTypes.func.isRequired,
|
||||
|
@ -53,13 +53,14 @@ class AddNewDiscoverMovieModalContentConnector extends Component {
|
||||
this.props.setAddMovieDefault({ [name]: value });
|
||||
}
|
||||
|
||||
onAddMoviePress = (searchForMovie) => {
|
||||
onAddMoviePress = () => {
|
||||
const {
|
||||
tmdbId,
|
||||
rootFolderPath,
|
||||
monitor,
|
||||
qualityProfileId,
|
||||
minimumAvailability,
|
||||
searchForMovie,
|
||||
tags
|
||||
} = this.props;
|
||||
|
||||
@ -69,8 +70,8 @@ class AddNewDiscoverMovieModalContentConnector extends Component {
|
||||
monitor: monitor.value,
|
||||
qualityProfileId: qualityProfileId.value,
|
||||
minimumAvailability: minimumAvailability.value,
|
||||
tags: tags.value,
|
||||
searchForMovie
|
||||
searchForMovie: searchForMovie.value,
|
||||
tags: tags.value
|
||||
});
|
||||
|
||||
this.props.onModalClose(true);
|
||||
@ -96,6 +97,7 @@ AddNewDiscoverMovieModalContentConnector.propTypes = {
|
||||
monitor: PropTypes.object.isRequired,
|
||||
qualityProfileId: PropTypes.object,
|
||||
minimumAvailability: PropTypes.object.isRequired,
|
||||
searchForMovie: PropTypes.object.isRequired,
|
||||
tags: PropTypes.object.isRequired,
|
||||
onModalClose: PropTypes.func.isRequired,
|
||||
setAddMovieDefault: PropTypes.func.isRequired,
|
||||
|
@ -33,6 +33,7 @@ export const defaultState = {
|
||||
monitor: 'true',
|
||||
qualityProfileId: 0,
|
||||
minimumAvailability: 'announced',
|
||||
searchForMovie: true,
|
||||
tags: []
|
||||
}
|
||||
};
|
||||
|
@ -49,8 +49,8 @@ export const defaultState = {
|
||||
monitor: 'true',
|
||||
qualityProfileId: 0,
|
||||
minimumAvailability: 'announced',
|
||||
tags: [],
|
||||
searchForMovie: false
|
||||
searchForMovie: true,
|
||||
tags: []
|
||||
},
|
||||
|
||||
posterOptions: {
|
||||
|
Loading…
Reference in New Issue
Block a user