New: CustomFormat Naming Token

This commit is contained in:
Qstick
2020-02-25 22:10:52 +00:00
committed by ta264
parent 50d6c5e61e
commit e986869e96
12 changed files with 114 additions and 12 deletions

View File

@@ -80,7 +80,8 @@ class EditCustomFormatModalContent extends Component {
const {
id,
name
name,
includeCustomFormatWhenRenaming
} = item;
return (
@@ -120,6 +121,18 @@ class EditCustomFormatModalContent extends Component {
onChange={onInputChange}
/>
</FormGroup>
<FormGroup>
<FormLabel>Include Custom Format when Renaming</FormLabel>
<FormInputGroup
type={inputTypes.CHECK}
name="includeCustomFormatWhenRenaming"
helpText="Include in {Custom Formats} renaming format"
{...includeCustomFormatWhenRenaming}
onChange={onInputChange}
/>
</FormGroup>
</Form>
<FieldSet legend="Conditions">

View File

@@ -152,6 +152,10 @@ class NamingModal extends Component {
{ token: '{Edition Tags}', example: 'IMAX' }
];
const customFormatTokens = [
{ token: '{Custom Formats}', example: 'Surround Sound x264' }
];
const originalTokens = [
{ token: '{Original Title}', example: 'Movie.Title.HDTV.x264-EVOLVE' },
{ token: '{Original Filename}', example: 'Movie.title.hdtv.x264-EVOLVE' }
@@ -348,6 +352,28 @@ class NamingModal extends Component {
</div>
</FieldSet>
<FieldSet legend="Custom Formats">
<div className={styles.groups}>
{
customFormatTokens.map(({ token, example }) => {
return (
<NamingOption
key={token}
name={name}
value={value}
token={token}
example={example}
tokenSeparator={tokenSeparator}
tokenCase={tokenCase}
onPress={this.onOptionPress}
/>
);
}
)
}
</div>
</FieldSet>
<FieldSet legend="Original">
<div className={styles.groups}>
{

View File

@@ -51,6 +51,9 @@ export default {
isSchemaPopulated: false,
isFetching: false,
isPopulated: false,
schema: {
includeCustomFormatWhenRenaming: false
},
error: null,
isDeleting: false,
deleteError: null,