Save Whitelisted Subtitle Tags as string

Fixes #9134
pull/9178/head
Bogdan 1 year ago
parent dce637905a
commit 11c7446cbe

@ -17,7 +17,8 @@ function IndexerOptions(props) {
error,
settings,
hasSettings,
onInputChange
onInputChange,
onWhitelistedSubtitleChange
} = props;
return (
@ -135,7 +136,7 @@ function IndexerOptions(props) {
type={inputTypes.TEXT_TAG}
name="whitelistedHardcodedSubs"
helpText={translate('WhitelistedHardcodedSubsHelpText')}
onChange={onInputChange}
onChange={onWhitelistedSubtitleChange}
{...settings.whitelistedHardcodedSubs}
/>
</FormGroup>
@ -166,7 +167,8 @@ IndexerOptions.propTypes = {
error: PropTypes.object,
settings: PropTypes.object.isRequired,
hasSettings: PropTypes.bool.isRequired,
onInputChange: PropTypes.func.isRequired
onInputChange: PropTypes.func.isRequired,
onWhitelistedSubtitleChange: PropTypes.func.isRequired
};
export default IndexerOptions;

@ -74,6 +74,10 @@ class IndexerOptionsConnector extends Component {
this.props.dispatchSetIndexerOptionsValue({ name, value });
};
onWhitelistedSubtitleChange = ({ name, value }) => {
this.props.dispatchSetIndexerOptionsValue({ name, value: value.join(',') });
};
//
// Render
@ -81,6 +85,7 @@ class IndexerOptionsConnector extends Component {
return (
<IndexerOptions
onInputChange={this.onInputChange}
onWhitelistedSubtitleChange={this.onWhitelistedSubtitleChange}
{...this.props}
/>
);

Loading…
Cancel
Save