diff --git a/frontend/src/DiscoverMovie/DiscoverMovieFooter.js b/frontend/src/DiscoverMovie/DiscoverMovieFooter.js index cc75157df..487954193 100644 --- a/frontend/src/DiscoverMovie/DiscoverMovieFooter.js +++ b/frontend/src/DiscoverMovie/DiscoverMovieFooter.js @@ -2,6 +2,7 @@ import _ from 'lodash'; import PropTypes from 'prop-types'; import React, { Component } from 'react'; import AvailabilitySelectInput from 'Components/Form/AvailabilitySelectInput'; +import CheckInput from 'Components/Form/CheckInput'; import QualityProfileSelectInputConnector from 'Components/Form/QualityProfileSelectInputConnector'; import RootFolderSelectInputConnector from 'Components/Form/RootFolderSelectInputConnector'; import SelectInput from 'Components/Form/SelectInput'; @@ -25,7 +26,8 @@ class DiscoverMovieFooter extends Component { defaultMonitor, defaultQualityProfileId, defaultMinimumAvailability, - defaultRootFolderPath + defaultRootFolderPath, + defaultSearchForMovie } = props; this.state = { @@ -33,6 +35,7 @@ class DiscoverMovieFooter extends Component { qualityProfileId: defaultQualityProfileId, minimumAvailability: defaultMinimumAvailability, rootFolderPath: defaultRootFolderPath, + searchForMovie: defaultSearchForMovie, isExcludeMovieModalOpen: false, destinationRootFolder: null }; @@ -43,14 +46,16 @@ class DiscoverMovieFooter extends Component { defaultMonitor, defaultQualityProfileId, defaultMinimumAvailability, - defaultRootFolderPath + defaultRootFolderPath, + defaultSearchForMovie } = this.props; const { monitor, qualityProfileId, minimumAvailability, - rootFolderPath + rootFolderPath, + searchForMovie } = this.state; const newState = {}; @@ -71,6 +76,10 @@ class DiscoverMovieFooter extends Component { newState.rootFolderPath = defaultRootFolderPath; } + if (searchForMovie !== defaultSearchForMovie) { + newState.searchForMovie = defaultSearchForMovie; + } + if (!_.isEmpty(newState)) { this.setState(newState); } @@ -79,9 +88,6 @@ class DiscoverMovieFooter extends Component { // // Listeners - // - // Listeners - onExcludeSelectedPress = () => { this.setState({ isExcludeMovieModalOpen: true }); } @@ -95,14 +101,16 @@ class DiscoverMovieFooter extends Component { monitor, qualityProfileId, minimumAvailability, - rootFolderPath + rootFolderPath, + searchForMovie } = this.state; const addOptions = { monitor, qualityProfileId, minimumAvailability, - rootFolderPath + rootFolderPath, + searchForMovie }; this.props.onAddMoviesPress({ addOptions }); @@ -125,6 +133,7 @@ class DiscoverMovieFooter extends Component { qualityProfileId, minimumAvailability, rootFolderPath, + searchForMovie, isExcludeMovieModalOpen } = this.state; @@ -193,6 +202,20 @@ class DiscoverMovieFooter extends Component { /> +