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 {
|
class AddNewMovieModalContent extends Component {
|
||||||
|
|
||||||
//
|
|
||||||
// Lifecycle
|
|
||||||
|
|
||||||
constructor(props, context) {
|
|
||||||
super(props, context);
|
|
||||||
|
|
||||||
this.state = {
|
|
||||||
searchForMovie: false
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Listeners
|
// Listeners
|
||||||
|
|
||||||
onSearchForMissingMovieChange = ({ value }) => {
|
|
||||||
this.setState({ searchForMovie: value });
|
|
||||||
}
|
|
||||||
|
|
||||||
onQualityProfileIdChange = ({ value }) => {
|
onQualityProfileIdChange = ({ value }) => {
|
||||||
this.props.onInputChange({ name: 'qualityProfileId', value: parseInt(value) });
|
this.props.onInputChange({ name: 'qualityProfileId', value: parseInt(value) });
|
||||||
}
|
}
|
||||||
|
|
||||||
onAddMoviePress = () => {
|
onAddMoviePress = () => {
|
||||||
this.props.onAddMoviePress(this.state.searchForMovie);
|
this.props.onAddMoviePress();
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
@ -57,6 +42,7 @@ class AddNewMovieModalContent extends Component {
|
|||||||
monitor,
|
monitor,
|
||||||
qualityProfileId,
|
qualityProfileId,
|
||||||
minimumAvailability,
|
minimumAvailability,
|
||||||
|
searchForMovie,
|
||||||
folder,
|
folder,
|
||||||
tags,
|
tags,
|
||||||
isSmallScreen,
|
isSmallScreen,
|
||||||
@ -175,8 +161,8 @@ class AddNewMovieModalContent extends Component {
|
|||||||
containerClassName={styles.searchForMissingMovieContainer}
|
containerClassName={styles.searchForMissingMovieContainer}
|
||||||
className={styles.searchForMissingMovieInput}
|
className={styles.searchForMissingMovieInput}
|
||||||
name="searchForMovie"
|
name="searchForMovie"
|
||||||
value={this.state.searchForMovie}
|
onChange={onInputChange}
|
||||||
onChange={this.onSearchForMissingMovieChange}
|
{...searchForMovie}
|
||||||
/>
|
/>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
@ -205,6 +191,7 @@ AddNewMovieModalContent.propTypes = {
|
|||||||
monitor: PropTypes.object.isRequired,
|
monitor: PropTypes.object.isRequired,
|
||||||
qualityProfileId: PropTypes.object,
|
qualityProfileId: PropTypes.object,
|
||||||
minimumAvailability: PropTypes.object.isRequired,
|
minimumAvailability: PropTypes.object.isRequired,
|
||||||
|
searchForMovie: PropTypes.object.isRequired,
|
||||||
folder: PropTypes.string.isRequired,
|
folder: PropTypes.string.isRequired,
|
||||||
tags: PropTypes.object.isRequired,
|
tags: PropTypes.object.isRequired,
|
||||||
isSmallScreen: PropTypes.bool.isRequired,
|
isSmallScreen: PropTypes.bool.isRequired,
|
||||||
|
@ -53,13 +53,14 @@ class AddNewMovieModalContentConnector extends Component {
|
|||||||
this.props.setAddMovieDefault({ [name]: value });
|
this.props.setAddMovieDefault({ [name]: value });
|
||||||
}
|
}
|
||||||
|
|
||||||
onAddMoviePress = (searchForMovie) => {
|
onAddMoviePress = () => {
|
||||||
const {
|
const {
|
||||||
tmdbId,
|
tmdbId,
|
||||||
rootFolderPath,
|
rootFolderPath,
|
||||||
monitor,
|
monitor,
|
||||||
qualityProfileId,
|
qualityProfileId,
|
||||||
minimumAvailability,
|
minimumAvailability,
|
||||||
|
searchForMovie,
|
||||||
tags
|
tags
|
||||||
} = this.props;
|
} = this.props;
|
||||||
|
|
||||||
@ -69,8 +70,8 @@ class AddNewMovieModalContentConnector extends Component {
|
|||||||
monitor: monitor.value,
|
monitor: monitor.value,
|
||||||
qualityProfileId: qualityProfileId.value,
|
qualityProfileId: qualityProfileId.value,
|
||||||
minimumAvailability: minimumAvailability.value,
|
minimumAvailability: minimumAvailability.value,
|
||||||
tags: tags.value,
|
searchForMovie: searchForMovie.value,
|
||||||
searchForMovie
|
tags: tags.value
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -94,6 +95,7 @@ AddNewMovieModalContentConnector.propTypes = {
|
|||||||
monitor: PropTypes.object.isRequired,
|
monitor: PropTypes.object.isRequired,
|
||||||
qualityProfileId: PropTypes.object,
|
qualityProfileId: PropTypes.object,
|
||||||
minimumAvailability: PropTypes.object.isRequired,
|
minimumAvailability: PropTypes.object.isRequired,
|
||||||
|
searchForMovie: PropTypes.object.isRequired,
|
||||||
tags: PropTypes.object.isRequired,
|
tags: PropTypes.object.isRequired,
|
||||||
onModalClose: PropTypes.func.isRequired,
|
onModalClose: PropTypes.func.isRequired,
|
||||||
setAddMovieDefault: PropTypes.func.isRequired,
|
setAddMovieDefault: PropTypes.func.isRequired,
|
||||||
|
@ -53,13 +53,14 @@ class AddNewDiscoverMovieModalContentConnector extends Component {
|
|||||||
this.props.setAddMovieDefault({ [name]: value });
|
this.props.setAddMovieDefault({ [name]: value });
|
||||||
}
|
}
|
||||||
|
|
||||||
onAddMoviePress = (searchForMovie) => {
|
onAddMoviePress = () => {
|
||||||
const {
|
const {
|
||||||
tmdbId,
|
tmdbId,
|
||||||
rootFolderPath,
|
rootFolderPath,
|
||||||
monitor,
|
monitor,
|
||||||
qualityProfileId,
|
qualityProfileId,
|
||||||
minimumAvailability,
|
minimumAvailability,
|
||||||
|
searchForMovie,
|
||||||
tags
|
tags
|
||||||
} = this.props;
|
} = this.props;
|
||||||
|
|
||||||
@ -69,8 +70,8 @@ class AddNewDiscoverMovieModalContentConnector extends Component {
|
|||||||
monitor: monitor.value,
|
monitor: monitor.value,
|
||||||
qualityProfileId: qualityProfileId.value,
|
qualityProfileId: qualityProfileId.value,
|
||||||
minimumAvailability: minimumAvailability.value,
|
minimumAvailability: minimumAvailability.value,
|
||||||
tags: tags.value,
|
searchForMovie: searchForMovie.value,
|
||||||
searchForMovie
|
tags: tags.value
|
||||||
});
|
});
|
||||||
|
|
||||||
this.props.onModalClose(true);
|
this.props.onModalClose(true);
|
||||||
@ -96,6 +97,7 @@ AddNewDiscoverMovieModalContentConnector.propTypes = {
|
|||||||
monitor: PropTypes.object.isRequired,
|
monitor: PropTypes.object.isRequired,
|
||||||
qualityProfileId: PropTypes.object,
|
qualityProfileId: PropTypes.object,
|
||||||
minimumAvailability: PropTypes.object.isRequired,
|
minimumAvailability: PropTypes.object.isRequired,
|
||||||
|
searchForMovie: PropTypes.object.isRequired,
|
||||||
tags: PropTypes.object.isRequired,
|
tags: PropTypes.object.isRequired,
|
||||||
onModalClose: PropTypes.func.isRequired,
|
onModalClose: PropTypes.func.isRequired,
|
||||||
setAddMovieDefault: PropTypes.func.isRequired,
|
setAddMovieDefault: PropTypes.func.isRequired,
|
||||||
|
@ -33,6 +33,7 @@ export const defaultState = {
|
|||||||
monitor: 'true',
|
monitor: 'true',
|
||||||
qualityProfileId: 0,
|
qualityProfileId: 0,
|
||||||
minimumAvailability: 'announced',
|
minimumAvailability: 'announced',
|
||||||
|
searchForMovie: true,
|
||||||
tags: []
|
tags: []
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -49,8 +49,8 @@ export const defaultState = {
|
|||||||
monitor: 'true',
|
monitor: 'true',
|
||||||
qualityProfileId: 0,
|
qualityProfileId: 0,
|
||||||
minimumAvailability: 'announced',
|
minimumAvailability: 'announced',
|
||||||
tags: [],
|
searchForMovie: true,
|
||||||
searchForMovie: false
|
tags: []
|
||||||
},
|
},
|
||||||
|
|
||||||
posterOptions: {
|
posterOptions: {
|
||||||
|
Loading…
Reference in New Issue
Block a user