mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-24 22:35:39 -04:00
Renames in Frontend
This commit is contained in:
@@ -34,7 +34,7 @@ const downloadPropersAndRepacksOptions = [
|
||||
|
||||
const fileDateOptions = [
|
||||
{ key: 'none', value: 'None' },
|
||||
{ key: 'albumReleaseDate', value: 'Album Release Date' }
|
||||
{ key: 'bookReleaseDate', value: 'Book Release Date' }
|
||||
];
|
||||
|
||||
class MediaManagement extends Component {
|
||||
@@ -96,14 +96,14 @@ class MediaManagement extends Component {
|
||||
isAdvanced={true}
|
||||
size={sizes.MEDIUM}
|
||||
>
|
||||
<FormLabel>Create empty artist folders</FormLabel>
|
||||
<FormLabel>Create empty author folders</FormLabel>
|
||||
|
||||
<FormInputGroup
|
||||
type={inputTypes.CHECK}
|
||||
name="createEmptyArtistFolders"
|
||||
helpText="Create missing artist folders during disk scan"
|
||||
name="createEmptyAuthorFolders"
|
||||
helpText="Create missing author folders during disk scan"
|
||||
onChange={onInputChange}
|
||||
{...settings.createEmptyArtistFolders}
|
||||
{...settings.createEmptyAuthorFolders}
|
||||
/>
|
||||
</FormGroup>
|
||||
|
||||
@@ -117,7 +117,7 @@ class MediaManagement extends Component {
|
||||
<FormInputGroup
|
||||
type={inputTypes.CHECK}
|
||||
name="deleteEmptyFolders"
|
||||
helpText="Delete empty artist and album folders during disk scan and when track files are deleted"
|
||||
helpText="Delete empty author folders during disk scan and when book files are deleted"
|
||||
onChange={onInputChange}
|
||||
{...settings.deleteEmptyFolders}
|
||||
/>
|
||||
@@ -142,7 +142,7 @@ class MediaManagement extends Component {
|
||||
<FormInputGroup
|
||||
type={inputTypes.CHECK}
|
||||
name="skipFreeSpaceCheckWhenImporting"
|
||||
helpText="Use when Readarr is unable to detect free space from your artist root folder"
|
||||
helpText="Use when Readarr is unable to detect free space from your author root folder"
|
||||
onChange={onInputChange}
|
||||
{...settings.skipFreeSpaceCheckWhenImporting}
|
||||
/>
|
||||
@@ -189,7 +189,7 @@ class MediaManagement extends Component {
|
||||
<FormInputGroup
|
||||
type={inputTypes.CHECK}
|
||||
name="importExtraFiles"
|
||||
helpText="Import matching extra files (subtitles, nfo, etc) after importing an track file"
|
||||
helpText="Import matching extra files (subtitles, nfo, etc) after importing an book file"
|
||||
onChange={onInputChange}
|
||||
{...settings.importExtraFiles}
|
||||
/>
|
||||
@@ -222,14 +222,14 @@ class MediaManagement extends Component {
|
||||
legend="File Management"
|
||||
>
|
||||
<FormGroup size={sizes.MEDIUM}>
|
||||
<FormLabel>Ignore Deleted Tracks</FormLabel>
|
||||
<FormLabel>Ignore Deleted Books</FormLabel>
|
||||
|
||||
<FormInputGroup
|
||||
type={inputTypes.CHECK}
|
||||
name="autoUnmonitorPreviouslyDownloadedTracks"
|
||||
helpText="Tracks deleted from disk are automatically unmonitored in Readarr"
|
||||
name="autoUnmonitorPreviouslyDownloadedBooks"
|
||||
helpText="Books deleted from disk are automatically unmonitored in Readarr"
|
||||
onChange={onInputChange}
|
||||
{...settings.autoUnmonitorPreviouslyDownloadedTracks}
|
||||
{...settings.autoUnmonitorPreviouslyDownloadedBooks}
|
||||
/>
|
||||
</FormGroup>
|
||||
|
||||
@@ -278,12 +278,12 @@ class MediaManagement extends Component {
|
||||
advancedSettings={advancedSettings}
|
||||
isAdvanced={true}
|
||||
>
|
||||
<FormLabel>Rescan Artist Folder after Refresh</FormLabel>
|
||||
<FormLabel>Rescan Author Folder after Refresh</FormLabel>
|
||||
|
||||
<FormInputGroup
|
||||
type={inputTypes.SELECT}
|
||||
name="rescanAfterRefresh"
|
||||
helpText="Rescan the artist folder after refreshing the artist"
|
||||
helpText="Rescan the author folder after refreshing the author"
|
||||
helpTextWarning="Readarr will not automatically detect changes to files when not set to 'Always'"
|
||||
values={rescanAfterRefreshOptions}
|
||||
onChange={onInputChange}
|
||||
@@ -300,7 +300,7 @@ class MediaManagement extends Component {
|
||||
<FormInputGroup
|
||||
type={inputTypes.SELECT}
|
||||
name="allowFingerprinting"
|
||||
helpText="Use fingerprinting to improve accuracy of track matching"
|
||||
helpText="Use fingerprinting to improve accuracy of book matching"
|
||||
helpTextWarning="This requires Readarr to read parts of the file which will slow down scans and may cause high disk or network activity."
|
||||
values={allowFingerprintingOptions}
|
||||
onChange={onInputChange}
|
||||
@@ -333,7 +333,7 @@ class MediaManagement extends Component {
|
||||
<FormInputGroup
|
||||
type={inputTypes.PATH}
|
||||
name="recycleBin"
|
||||
helpText="Track files will go here when deleted instead of being permanently deleted"
|
||||
helpText="Book files will go here when deleted instead of being permanently deleted"
|
||||
onChange={onInputChange}
|
||||
{...settings.recycleBin}
|
||||
/>
|
||||
@@ -403,7 +403,7 @@ class MediaManagement extends Component {
|
||||
<FormInputGroup
|
||||
type={inputTypes.TEXT}
|
||||
name="folderChmod"
|
||||
helpText="Octal, applied to artist/album folders created by Readarr"
|
||||
helpText="Octal, applied to author/book folders created by Readarr"
|
||||
values={fileDateOptions}
|
||||
onChange={onInputChange}
|
||||
{...settings.folderChmod}
|
||||
|
||||
@@ -33,8 +33,7 @@ class Naming extends Component {
|
||||
isNamingModalOpen: true,
|
||||
namingModalOptions: {
|
||||
name: 'standardBookFormat',
|
||||
album: true,
|
||||
track: true,
|
||||
book: true,
|
||||
additional: true
|
||||
}
|
||||
});
|
||||
@@ -81,21 +80,21 @@ class Naming extends Component {
|
||||
const authorFolderFormatErrors = [];
|
||||
|
||||
if (examplesPopulated) {
|
||||
if (examples.singleTrackExample) {
|
||||
standardBookFormatHelpTexts.push(`Single Track: ${examples.singleTrackExample}`);
|
||||
if (examples.singleBookExample) {
|
||||
standardBookFormatHelpTexts.push(`Single Book: ${examples.singleBookExample}`);
|
||||
} else {
|
||||
standardBookFormatErrors.push({ message: 'Single Track: Invalid Format' });
|
||||
standardBookFormatErrors.push({ message: 'Single Book: Invalid Format' });
|
||||
}
|
||||
|
||||
if (examples.artistFolderExample) {
|
||||
authorFolderFormatHelpTexts.push(`Example: ${examples.artistFolderExample}`);
|
||||
if (examples.authorFolderExample) {
|
||||
authorFolderFormatHelpTexts.push(`Example: ${examples.authorFolderExample}`);
|
||||
} else {
|
||||
authorFolderFormatErrors.push({ message: 'Invalid Format' });
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
<FieldSet legend="Track Naming">
|
||||
<FieldSet legend="Book Naming">
|
||||
{
|
||||
isFetching &&
|
||||
<LoadingIndicator />
|
||||
@@ -110,7 +109,7 @@ class Naming extends Component {
|
||||
hasSettings && !isFetching && !error &&
|
||||
<Form>
|
||||
<FormGroup size={sizes.MEDIUM}>
|
||||
<FormLabel>Rename Tracks</FormLabel>
|
||||
<FormLabel>Rename Books</FormLabel>
|
||||
|
||||
<FormInputGroup
|
||||
type={inputTypes.CHECK}
|
||||
@@ -157,7 +156,7 @@ class Naming extends Component {
|
||||
advancedSettings={advancedSettings}
|
||||
isAdvanced={true}
|
||||
>
|
||||
<FormLabel>Artist Folder Format</FormLabel>
|
||||
<FormLabel>Author Folder Format</FormLabel>
|
||||
|
||||
<FormInputGroup
|
||||
inputClassName={styles.namingInput}
|
||||
@@ -166,7 +165,7 @@ class Naming extends Component {
|
||||
buttons={<FormInputButton onPress={this.onAuthorFolderNamingModalOpenClick}>?</FormInputButton>}
|
||||
onChange={onInputChange}
|
||||
{...settings.authorFolderFormat}
|
||||
helpTexts={['Used when adding a new artist or moving an author via the author editor', ...authorFolderFormatHelpTexts]}
|
||||
helpTexts={['Used when adding a new author or moving an author via the author editor', ...authorFolderFormatHelpTexts]}
|
||||
errors={[...authorFolderFormatErrors, ...settings.authorFolderFormat.errors]}
|
||||
/>
|
||||
</FormGroup>
|
||||
|
||||
@@ -28,16 +28,16 @@ const caseOptions = [
|
||||
|
||||
const fileNameTokens = [
|
||||
{
|
||||
token: '{Author Name} - {Book Title} - {track:00} - {Track Title} {Quality Full}',
|
||||
example: 'Author Name - Book Title - 01 - Track Title MP3-320 Proper'
|
||||
token: '{Author Name} - {Book Title} - {Quality Full}',
|
||||
example: 'Author Name - Book Title - MP3-320 Proper'
|
||||
},
|
||||
{
|
||||
token: '{Author.Name}.{Book.Title}.{track:00}.{TrackClean.Title}.{Quality.Full}',
|
||||
example: 'Author.Name.Book.Title.01.Track.Title.MP3-320'
|
||||
token: '{Author.Name}.{Book.Title}.{Quality.Full}',
|
||||
example: 'Author.Name.Book.Title.MP3-320'
|
||||
}
|
||||
];
|
||||
|
||||
const artistTokens = [
|
||||
const authorTokens = [
|
||||
{ token: '{Author Name}', example: 'Author Name' },
|
||||
|
||||
{ token: '{Author NameThe}', example: 'Author Name, The' },
|
||||
@@ -47,7 +47,7 @@ const artistTokens = [
|
||||
{ token: '{Author Disambiguation}', example: 'Disambiguation' }
|
||||
];
|
||||
|
||||
const albumTokens = [
|
||||
const bookTokens = [
|
||||
{ token: '{Book Title}', example: 'Book Title' },
|
||||
|
||||
{ token: '{Book TitleThe}', example: 'Book Title, The' },
|
||||
@@ -68,20 +68,10 @@ const mediumFormatTokens = [
|
||||
{ token: '{Medium Format}', example: 'CD' }
|
||||
];
|
||||
|
||||
const trackTokens = [
|
||||
{ token: '{track:0}', example: '1' },
|
||||
{ token: '{track:00}', example: '01' }
|
||||
];
|
||||
|
||||
const releaseDateTokens = [
|
||||
{ token: '{Release Year}', example: '2016' }
|
||||
];
|
||||
|
||||
const trackTitleTokens = [
|
||||
{ token: '{Track Title}', example: 'Track Title' },
|
||||
{ token: '{Track CleanTitle}', example: 'Track Title' }
|
||||
];
|
||||
|
||||
const qualityTokens = [
|
||||
{ token: '{Quality Full}', example: 'FLAC Proper' },
|
||||
{ token: '{Quality Title}', example: 'FLAC' }
|
||||
@@ -102,7 +92,7 @@ const otherTokens = [
|
||||
|
||||
const originalTokens = [
|
||||
{ token: '{Original Title}', example: 'Author.Name.Book.Name.2018.FLAC-EVOLVE' },
|
||||
{ token: '{Original Filename}', example: '01 - track name' }
|
||||
{ token: '{Original Filename}', example: '01 - book name' }
|
||||
];
|
||||
|
||||
class NamingModal extends Component {
|
||||
@@ -175,8 +165,7 @@ class NamingModal extends Component {
|
||||
value,
|
||||
isOpen,
|
||||
advancedSettings,
|
||||
album,
|
||||
track,
|
||||
book,
|
||||
additional,
|
||||
onInputChange,
|
||||
onModalClose
|
||||
@@ -246,7 +235,7 @@ class NamingModal extends Component {
|
||||
<FieldSet legend="Author">
|
||||
<div className={styles.groups}>
|
||||
{
|
||||
artistTokens.map(({ token, example }) => {
|
||||
authorTokens.map(({ token, example }) => {
|
||||
return (
|
||||
<NamingOption
|
||||
key={token}
|
||||
@@ -266,12 +255,12 @@ class NamingModal extends Component {
|
||||
</FieldSet>
|
||||
|
||||
{
|
||||
album &&
|
||||
book &&
|
||||
<div>
|
||||
<FieldSet legend="Book">
|
||||
<div className={styles.groups}>
|
||||
{
|
||||
albumTokens.map(({ token, example }) => {
|
||||
bookTokens.map(({ token, example }) => {
|
||||
return (
|
||||
<NamingOption
|
||||
key={token}
|
||||
@@ -315,7 +304,7 @@ class NamingModal extends Component {
|
||||
}
|
||||
|
||||
{
|
||||
track &&
|
||||
book &&
|
||||
<div>
|
||||
<FieldSet legend="Medium">
|
||||
<div className={styles.groups}>
|
||||
@@ -361,56 +350,12 @@ class NamingModal extends Component {
|
||||
</div>
|
||||
</FieldSet>
|
||||
|
||||
<FieldSet legend="Track">
|
||||
<div className={styles.groups}>
|
||||
{
|
||||
trackTokens.map(({ token, example }) => {
|
||||
return (
|
||||
<NamingOption
|
||||
key={token}
|
||||
name={name}
|
||||
value={value}
|
||||
token={token}
|
||||
example={example}
|
||||
tokenSeparator={tokenSeparator}
|
||||
tokenCase={tokenCase}
|
||||
onPress={this.onOptionPress}
|
||||
/>
|
||||
);
|
||||
}
|
||||
)
|
||||
}
|
||||
</div>
|
||||
</FieldSet>
|
||||
|
||||
</div>
|
||||
}
|
||||
|
||||
{
|
||||
additional &&
|
||||
<div>
|
||||
<FieldSet legend="Track Title">
|
||||
<div className={styles.groups}>
|
||||
{
|
||||
trackTitleTokens.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="Quality">
|
||||
<div className={styles.groups}>
|
||||
{
|
||||
@@ -525,16 +470,14 @@ NamingModal.propTypes = {
|
||||
value: PropTypes.string.isRequired,
|
||||
isOpen: PropTypes.bool.isRequired,
|
||||
advancedSettings: PropTypes.bool.isRequired,
|
||||
album: PropTypes.bool.isRequired,
|
||||
track: PropTypes.bool.isRequired,
|
||||
book: PropTypes.bool.isRequired,
|
||||
additional: PropTypes.bool.isRequired,
|
||||
onInputChange: PropTypes.func.isRequired,
|
||||
onModalClose: PropTypes.func.isRequired
|
||||
};
|
||||
|
||||
NamingModal.defaultProps = {
|
||||
album: false,
|
||||
track: false,
|
||||
book: false,
|
||||
additional: false
|
||||
};
|
||||
|
||||
|
||||
@@ -14,8 +14,8 @@ import FormGroup from 'Components/Form/FormGroup';
|
||||
import FormLabel from 'Components/Form/FormLabel';
|
||||
import FormInputGroup from 'Components/Form/FormInputGroup';
|
||||
import Popover from 'Components/Tooltip/Popover';
|
||||
import ArtistMonitoringOptionsPopoverContent from 'AddArtist/ArtistMonitoringOptionsPopoverContent';
|
||||
import ArtistMetadataProfilePopoverContent from 'AddArtist/ArtistMetadataProfilePopoverContent';
|
||||
import AuthorMonitoringOptionsPopoverContent from 'AddAuthor/AuthorMonitoringOptionsPopoverContent';
|
||||
import AuthorMetadataProfilePopoverContent from 'AddAuthor/AuthorMetadataProfilePopoverContent';
|
||||
import styles from './EditRootFolderModalContent.css';
|
||||
|
||||
function EditRootFolderModalContent(props) {
|
||||
@@ -227,13 +227,13 @@ function EditRootFolderModalContent(props) {
|
||||
/>
|
||||
}
|
||||
title="Monitoring Options"
|
||||
body={<ArtistMonitoringOptionsPopoverContent />}
|
||||
body={<AuthorMonitoringOptionsPopoverContent />}
|
||||
position={tooltipPositions.RIGHT}
|
||||
/>
|
||||
</FormLabel>
|
||||
|
||||
<FormInputGroup
|
||||
type={inputTypes.MONITOR_ALBUMS_SELECT}
|
||||
type={inputTypes.MONITOR_BOOKS_SELECT}
|
||||
name="defaultMonitorOption"
|
||||
onChange={onInputChange}
|
||||
{...defaultMonitorOption}
|
||||
@@ -265,7 +265,7 @@ function EditRootFolderModalContent(props) {
|
||||
/>
|
||||
}
|
||||
title="Metadata Profile"
|
||||
body={<ArtistMetadataProfilePopoverContent />}
|
||||
body={<AuthorMetadataProfilePopoverContent />}
|
||||
position={tooltipPositions.RIGHT}
|
||||
/>
|
||||
</FormLabel>
|
||||
|
||||
Reference in New Issue
Block a user