mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-26 22:46:37 -04:00
Method, Variable, Class Renames in Readarr.Core
Co-Authored-By: ta264 <ta264@users.noreply.github.com>
This commit is contained in:
@@ -32,7 +32,7 @@ class Naming extends Component {
|
||||
this.setState({
|
||||
isNamingModalOpen: true,
|
||||
namingModalOptions: {
|
||||
name: 'standardTrackFormat',
|
||||
name: 'standardBookFormat',
|
||||
album: true,
|
||||
track: true,
|
||||
additional: true
|
||||
@@ -40,11 +40,11 @@ class Naming extends Component {
|
||||
});
|
||||
}
|
||||
|
||||
onArtistFolderNamingModalOpenClick = () => {
|
||||
onAuthorFolderNamingModalOpenClick = () => {
|
||||
this.setState({
|
||||
isNamingModalOpen: true,
|
||||
namingModalOptions: {
|
||||
name: 'artistFolderFormat'
|
||||
name: 'authorFolderFormat'
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -73,24 +73,24 @@ class Naming extends Component {
|
||||
namingModalOptions
|
||||
} = this.state;
|
||||
|
||||
const renameTracks = hasSettings && settings.renameTracks.value;
|
||||
const renameBooks = hasSettings && settings.renameBooks.value;
|
||||
|
||||
const standardTrackFormatHelpTexts = [];
|
||||
const standardTrackFormatErrors = [];
|
||||
const artistFolderFormatHelpTexts = [];
|
||||
const artistFolderFormatErrors = [];
|
||||
const standardBookFormatHelpTexts = [];
|
||||
const standardBookFormatErrors = [];
|
||||
const authorFolderFormatHelpTexts = [];
|
||||
const authorFolderFormatErrors = [];
|
||||
|
||||
if (examplesPopulated) {
|
||||
if (examples.singleTrackExample) {
|
||||
standardTrackFormatHelpTexts.push(`Single Track: ${examples.singleTrackExample}`);
|
||||
standardBookFormatHelpTexts.push(`Single Track: ${examples.singleTrackExample}`);
|
||||
} else {
|
||||
standardTrackFormatErrors.push({ message: 'Single Track: Invalid Format' });
|
||||
standardBookFormatErrors.push({ message: 'Single Track: Invalid Format' });
|
||||
}
|
||||
|
||||
if (examples.artistFolderExample) {
|
||||
artistFolderFormatHelpTexts.push(`Example: ${examples.artistFolderExample}`);
|
||||
authorFolderFormatHelpTexts.push(`Example: ${examples.artistFolderExample}`);
|
||||
} else {
|
||||
artistFolderFormatErrors.push({ message: 'Invalid Format' });
|
||||
authorFolderFormatErrors.push({ message: 'Invalid Format' });
|
||||
}
|
||||
}
|
||||
|
||||
@@ -114,10 +114,10 @@ class Naming extends Component {
|
||||
|
||||
<FormInputGroup
|
||||
type={inputTypes.CHECK}
|
||||
name="renameTracks"
|
||||
name="renameBooks"
|
||||
helpText="Readarr will use the existing file name if renaming is disabled"
|
||||
onChange={onInputChange}
|
||||
{...settings.renameTracks}
|
||||
{...settings.renameBooks}
|
||||
/>
|
||||
</FormGroup>
|
||||
|
||||
@@ -134,20 +134,20 @@ class Naming extends Component {
|
||||
</FormGroup>
|
||||
|
||||
{
|
||||
renameTracks &&
|
||||
renameBooks &&
|
||||
<div>
|
||||
<FormGroup size={sizes.LARGE}>
|
||||
<FormLabel>Standard Track Format</FormLabel>
|
||||
<FormLabel>Standard Book Format</FormLabel>
|
||||
|
||||
<FormInputGroup
|
||||
inputClassName={styles.namingInput}
|
||||
type={inputTypes.TEXT}
|
||||
name="standardTrackFormat"
|
||||
name="standardBookFormat"
|
||||
buttons={<FormInputButton onPress={this.onStandardNamingModalOpenClick}>?</FormInputButton>}
|
||||
onChange={onInputChange}
|
||||
{...settings.standardTrackFormat}
|
||||
helpTexts={standardTrackFormatHelpTexts}
|
||||
errors={[...standardTrackFormatErrors, ...settings.standardTrackFormat.errors]}
|
||||
{...settings.standardBookFormat}
|
||||
helpTexts={standardBookFormatHelpTexts}
|
||||
errors={[...standardBookFormatErrors, ...settings.standardBookFormat.errors]}
|
||||
/>
|
||||
</FormGroup>
|
||||
</div>
|
||||
@@ -162,12 +162,12 @@ class Naming extends Component {
|
||||
<FormInputGroup
|
||||
inputClassName={styles.namingInput}
|
||||
type={inputTypes.TEXT}
|
||||
name="artistFolderFormat"
|
||||
buttons={<FormInputButton onPress={this.onArtistFolderNamingModalOpenClick}>?</FormInputButton>}
|
||||
name="authorFolderFormat"
|
||||
buttons={<FormInputButton onPress={this.onAuthorFolderNamingModalOpenClick}>?</FormInputButton>}
|
||||
onChange={onInputChange}
|
||||
{...settings.artistFolderFormat}
|
||||
helpTexts={['Used when adding a new artist or moving an artist via the artist editor', ...artistFolderFormatHelpTexts]}
|
||||
errors={[...artistFolderFormatErrors, ...settings.artistFolderFormat.errors]}
|
||||
{...settings.authorFolderFormat}
|
||||
helpTexts={['Used when adding a new artist or moving an author via the author editor', ...authorFolderFormatHelpTexts]}
|
||||
errors={[...authorFolderFormatErrors, ...settings.authorFolderFormat.errors]}
|
||||
/>
|
||||
</FormGroup>
|
||||
|
||||
|
||||
@@ -28,35 +28,35 @@ const caseOptions = [
|
||||
|
||||
const fileNameTokens = [
|
||||
{
|
||||
token: '{Artist Name} - {Album Title} - {track:00} - {Track Title} {Quality Full}',
|
||||
example: 'Artist Name - Album Title - 01 - Track Title MP3-320 Proper'
|
||||
token: '{Author Name} - {Book Title} - {track:00} - {Track Title} {Quality Full}',
|
||||
example: 'Author Name - Book Title - 01 - Track Title MP3-320 Proper'
|
||||
},
|
||||
{
|
||||
token: '{Artist.Name}.{Album.Title}.{track:00}.{TrackClean.Title}.{Quality.Full}',
|
||||
example: 'Artist.Name.Album.Title.01.Track.Title.MP3-320'
|
||||
token: '{Author.Name}.{Book.Title}.{track:00}.{TrackClean.Title}.{Quality.Full}',
|
||||
example: 'Author.Name.Book.Title.01.Track.Title.MP3-320'
|
||||
}
|
||||
];
|
||||
|
||||
const artistTokens = [
|
||||
{ token: '{Artist Name}', example: 'Artist Name' },
|
||||
{ token: '{Author Name}', example: 'Author Name' },
|
||||
|
||||
{ token: '{Artist NameThe}', example: 'Artist Name, The' },
|
||||
{ token: '{Author NameThe}', example: 'Author Name, The' },
|
||||
|
||||
{ token: '{Artist CleanName}', example: 'Artist Name' },
|
||||
{ token: '{Author CleanName}', example: 'Author Name' },
|
||||
|
||||
{ token: '{Artist Disambiguation}', example: 'Disambiguation' }
|
||||
{ token: '{Author Disambiguation}', example: 'Disambiguation' }
|
||||
];
|
||||
|
||||
const albumTokens = [
|
||||
{ token: '{Album Title}', example: 'Album Title' },
|
||||
{ token: '{Book Title}', example: 'Book Title' },
|
||||
|
||||
{ token: '{Album TitleThe}', example: 'Album Title, The' },
|
||||
{ token: '{Book TitleThe}', example: 'Book Title, The' },
|
||||
|
||||
{ token: '{Album CleanTitle}', example: 'Album Title' },
|
||||
{ token: '{Book CleanTitle}', example: 'Book Title' },
|
||||
|
||||
{ token: '{Album Type}', example: 'Album Type' },
|
||||
{ token: '{Book Type}', example: 'Book Type' },
|
||||
|
||||
{ token: '{Album Disambiguation}', example: 'Disambiguation' }
|
||||
{ token: '{Book Disambiguation}', example: 'Disambiguation' }
|
||||
];
|
||||
|
||||
const mediumTokens = [
|
||||
@@ -101,7 +101,7 @@ const otherTokens = [
|
||||
];
|
||||
|
||||
const originalTokens = [
|
||||
{ token: '{Original Title}', example: 'Artist.Name.Album.Name.2018.FLAC-EVOLVE' },
|
||||
{ token: '{Original Title}', example: 'Author.Name.Book.Name.2018.FLAC-EVOLVE' },
|
||||
{ token: '{Original Filename}', example: '01 - track name' }
|
||||
];
|
||||
|
||||
@@ -243,7 +243,7 @@ class NamingModal extends Component {
|
||||
</FieldSet>
|
||||
}
|
||||
|
||||
<FieldSet legend="Artist">
|
||||
<FieldSet legend="Author">
|
||||
<div className={styles.groups}>
|
||||
{
|
||||
artistTokens.map(({ token, example }) => {
|
||||
@@ -268,7 +268,7 @@ class NamingModal extends Component {
|
||||
{
|
||||
album &&
|
||||
<div>
|
||||
<FieldSet legend="Album">
|
||||
<FieldSet legend="Book">
|
||||
<div className={styles.groups}>
|
||||
{
|
||||
albumTokens.map(({ token, example }) => {
|
||||
|
||||
Reference in New Issue
Block a user