1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2026-04-26 22:56:23 -04:00

New: Colon replacement naming option

This commit is contained in:
Mark McDowall
2023-04-23 21:15:27 -07:00
parent d3ad970ecc
commit b3260ba866
7 changed files with 207 additions and 20 deletions
@@ -120,6 +120,7 @@ class Naming extends Component {
} = this.state;
const renameEpisodes = hasSettings && settings.renameEpisodes.value;
const replaceIllegalCharacters = hasSettings && settings.replaceIllegalCharacters.value;
const multiEpisodeStyleOptions = [
{ key: 0, value: 'Extend', hint: 'S01E01-02-03' },
@@ -130,6 +131,14 @@ class Naming extends Component {
{ key: 5, value: 'Prefixed Range', hint: 'S01E01-E03' }
];
const colonReplacementOptions = [
{ key: 0, value: 'Delete' },
{ key: 1, value: 'Replace with Dash' },
{ key: 2, value: 'Replace with Space Dash' },
{ key: 3, value: 'Replace with Space Dash Space' },
{ key: 4, value: 'Smart Replace', hint: 'Dash or Space Dash depending on name' }
];
const standardEpisodeFormatHelpTexts = [];
const standardEpisodeFormatErrors = [];
const dailyEpisodeFormatHelpTexts = [];
@@ -232,6 +241,22 @@ class Naming extends Component {
/>
</FormGroup>
{
replaceIllegalCharacters ?
<FormGroup>
<FormLabel>Colon Replacement</FormLabel>
<FormInputGroup
type={inputTypes.SELECT}
name="colonReplacementFormat"
values={colonReplacementOptions}
onChange={onInputChange}
{...settings.colonReplacementFormat}
/>
</FormGroup> :
null
}
{
renameEpisodes &&
<div>