Fixed: Format Cutoff Selection searches Qualities not Formats

pull/2/head
Qstick 5 years ago
parent 5c7d20df54
commit c6cae162be

@ -99,6 +99,7 @@ class EditQualityProfileModalContent extends Component {
isInUse, isInUse,
onInputChange, onInputChange,
onCutoffChange, onCutoffChange,
onFormatCutoffChange,
onLanguageChange, onLanguageChange,
onSavePress, onSavePress,
onModalClose, onModalClose,
@ -212,7 +213,7 @@ class EditQualityProfileModalContent extends Component {
{...formatCutoff} {...formatCutoff}
values={customFormats} values={customFormats}
helpText="Once this custom format is reached Radarr will no longer download movies" helpText="Once this custom format is reached Radarr will no longer download movies"
onChange={onCutoffChange} onChange={onFormatCutoffChange}
/> />
</FormGroup> </FormGroup>
} }
@ -319,6 +320,7 @@ EditQualityProfileModalContent.propTypes = {
isInUse: PropTypes.bool.isRequired, isInUse: PropTypes.bool.isRequired,
onInputChange: PropTypes.func.isRequired, onInputChange: PropTypes.func.isRequired,
onCutoffChange: PropTypes.func.isRequired, onCutoffChange: PropTypes.func.isRequired,
onFormatCutoffChange: PropTypes.func.isRequired,
onLanguageChange: PropTypes.func.isRequired, onLanguageChange: PropTypes.func.isRequired,
onSavePress: PropTypes.func.isRequired, onSavePress: PropTypes.func.isRequired,
onContentHeightChange: PropTypes.func.isRequired, onContentHeightChange: PropTypes.func.isRequired,

@ -239,6 +239,17 @@ class EditQualityProfileModalContentConnector extends Component {
this.props.setQualityProfileValue({ name, value: cutoffId }); this.props.setQualityProfileValue({ name, value: cutoffId });
} }
onFormatCutoffChange = ({ name, value }) => {
const id = parseInt(value);
const item = _.find(this.props.item.formatItems.value, (i) => {
return i.format.id === id;
});
const cutoffId = item.format.id;
this.props.setQualityProfileValue({ name, value: cutoffId });
}
onLanguageChange = ({ name, value }) => { onLanguageChange = ({ name, value }) => {
const id = parseInt(value); const id = parseInt(value);
@ -550,6 +561,7 @@ class EditQualityProfileModalContentConnector extends Component {
onSavePress={this.onSavePress} onSavePress={this.onSavePress}
onInputChange={this.onInputChange} onInputChange={this.onInputChange}
onCutoffChange={this.onCutoffChange} onCutoffChange={this.onCutoffChange}
onFormatCutoffChange={this.onFormatCutoffChange}
onLanguageChange={this.onLanguageChange} onLanguageChange={this.onLanguageChange}
onCreateGroupPress={this.onCreateGroupPress} onCreateGroupPress={this.onCreateGroupPress}
onDeleteGroupPress={this.onDeleteGroupPress} onDeleteGroupPress={this.onDeleteGroupPress}

Loading…
Cancel
Save