Save Whitelisted Subtitle Tags as string

Fixes #9134
This commit is contained in:
Bogdan 2023-09-14 22:37:53 +03:00
parent dce637905a
commit 11c7446cbe
2 changed files with 10 additions and 3 deletions

View File

@ -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;

View File

@ -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}
/>
);