mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-14 02:37:08 -07:00
[UI Work] Settings Naming Page, Other Settings
This commit is contained in:
parent
22d9c5e666
commit
456ead09da
14 changed files with 281 additions and 393 deletions
|
@ -74,7 +74,7 @@ class OrganizePreviewModalContent extends Component {
|
|||
isPopulated,
|
||||
error,
|
||||
items,
|
||||
renameEpisodes,
|
||||
renameTracks,
|
||||
episodeFormat,
|
||||
path,
|
||||
onModalClose
|
||||
|
@ -109,7 +109,7 @@ class OrganizePreviewModalContent extends Component {
|
|||
!isFetching && isPopulated && !items.length &&
|
||||
<div>
|
||||
{
|
||||
renameEpisodes ?
|
||||
renameTracks ?
|
||||
<div>Success! My work is done, no files to rename.</div> :
|
||||
<div>Renaming is disabled, nothing to rename</div>
|
||||
}
|
||||
|
@ -191,7 +191,7 @@ OrganizePreviewModalContent.propTypes = {
|
|||
error: PropTypes.object,
|
||||
items: PropTypes.arrayOf(PropTypes.object).isRequired,
|
||||
path: PropTypes.string.isRequired,
|
||||
renameEpisodes: PropTypes.bool,
|
||||
renameTracks: PropTypes.bool,
|
||||
episodeFormat: PropTypes.string,
|
||||
onOrganizePress: PropTypes.func.isRequired,
|
||||
onModalClose: PropTypes.func.isRequired
|
||||
|
|
|
@ -19,7 +19,7 @@ function createMapStateToProps() {
|
|||
props.isFetching = organizePreview.isFetching || naming.isFetching;
|
||||
props.isPopulated = organizePreview.isPopulated && naming.isPopulated;
|
||||
props.error = organizePreview.error || naming.error;
|
||||
props.renameEpisodes = naming.item.renameEpisodes;
|
||||
props.renameTracks = naming.item.renameTracks;
|
||||
props.episodeFormat = naming.item[`${series.seriesType}EpisodeFormat`];
|
||||
props.path = series.path;
|
||||
|
||||
|
|
|
@ -519,7 +519,7 @@ class GeneralSettings extends Component {
|
|||
<FormInputGroup
|
||||
type={inputTypes.CHECK}
|
||||
name="analyticsEnabled"
|
||||
helpText="Send anonymous usage and error information to Sonarr's servers. This includes information on your browser, which Sonarr WebUI pages you use, error reporting as well as OS and runtime version. We will use this information to prioritize features and bug fixes."
|
||||
helpText="Send anonymous usage and error information to Lidarr's servers. This includes information on your browser, which Lidarr WebUI pages you use, error reporting as well as OS and runtime version. We will use this information to prioritize features and bug fixes."
|
||||
helpTextWarning="Requires restart to take effect"
|
||||
onChange={onInputChange}
|
||||
{...analyticsEnabled}
|
||||
|
@ -541,7 +541,7 @@ class GeneralSettings extends Component {
|
|||
<FormInputGroup
|
||||
type={inputTypes.TEXT}
|
||||
name="branch"
|
||||
helpText="Branch to use to update Sonarr"
|
||||
helpText="Branch to use to update Lidarr"
|
||||
helpLink="https://github.com/Sonarr/Sonarr/wiki/Release-Branches"
|
||||
onChange={onInputChange}
|
||||
{...branch}
|
||||
|
@ -622,8 +622,8 @@ class GeneralSettings extends Component {
|
|||
<ConfirmModal
|
||||
isOpen={isRestartRequiredModalOpen}
|
||||
kind={kinds.DANGER}
|
||||
title="Restart Sonarr"
|
||||
message="Sonarr requires a restart to apply changes, do you want to restart now?"
|
||||
title="Restart Lidarr"
|
||||
message="Lidarr requires a restart to apply changes, do you want to restart now?"
|
||||
cancelLabel="I'll restart later"
|
||||
confirmLabel="Restart Now"
|
||||
onConfirm={this.onConfirmRestart}
|
||||
|
|
|
@ -73,14 +73,14 @@ class MediaManagement extends Component {
|
|||
isAdvanced={true}
|
||||
size={sizes.MEDIUM}
|
||||
>
|
||||
<FormLabel>Create empty series folders</FormLabel>
|
||||
<FormLabel>Create empty artist folders</FormLabel>
|
||||
|
||||
<FormInputGroup
|
||||
type={inputTypes.CHECK}
|
||||
name="createEmptySeriesFolders"
|
||||
name="createEmptyArtistFolders"
|
||||
helpText="Create missing series folders during disk scan"
|
||||
onChange={onInputChange}
|
||||
{...settings.createEmptySeriesFolders}
|
||||
{...settings.createEmptyArtistFolders}
|
||||
/>
|
||||
</FormGroup>
|
||||
</FieldSet>
|
||||
|
@ -103,7 +103,7 @@ class MediaManagement extends Component {
|
|||
<FormInputGroup
|
||||
type={inputTypes.CHECK}
|
||||
name="skipFreeSpaceCheckWhenImporting"
|
||||
helpText="Use when Lidarr is unable to detect free space from your series root folder"
|
||||
helpText="Use when Lidarr is unable to detect free space from your artist root folder"
|
||||
onChange={onInputChange}
|
||||
{...settings.skipFreeSpaceCheckWhenImporting}
|
||||
/>
|
||||
|
@ -133,7 +133,7 @@ class MediaManagement extends Component {
|
|||
<FormInputGroup
|
||||
type={inputTypes.CHECK}
|
||||
name="importExtraFiles"
|
||||
helpText="Import matching extra files (subtitles, nfo, etc) after importing an episode file"
|
||||
helpText="Import matching extra files (subtitles, nfo, etc) after importing an track file"
|
||||
onChange={onInputChange}
|
||||
{...settings.importExtraFiles}
|
||||
/>
|
||||
|
@ -163,14 +163,14 @@ class MediaManagement extends Component {
|
|||
legend="File Management"
|
||||
>
|
||||
<FormGroup size={sizes.MEDIUM}>
|
||||
<FormLabel>Ignore Deleted Episodes</FormLabel>
|
||||
<FormLabel>Ignore Deleted Tracks</FormLabel>
|
||||
|
||||
<FormInputGroup
|
||||
type={inputTypes.CHECK}
|
||||
name="autoUnmonitorPreviouslyDownloadedEpisodes"
|
||||
helpText="Episodes deleted from disk are automatically unmonitored in Lidarr"
|
||||
name="autoUnmonitorPreviouslyDownloadedTracks"
|
||||
helpText="Tracks deleted from disk are automatically unmonitored in Lidarr"
|
||||
onChange={onInputChange}
|
||||
{...settings.autoUnmonitorPreviouslyDownloadedEpisodes}
|
||||
{...settings.autoUnmonitorPreviouslyDownloadedTracks}
|
||||
/>
|
||||
</FormGroup>
|
||||
|
||||
|
@ -195,12 +195,12 @@ class MediaManagement extends Component {
|
|||
isAdvanced={true}
|
||||
size={sizes.MEDIUM}
|
||||
>
|
||||
<FormLabel>Analyse video files</FormLabel>
|
||||
<FormLabel>Analyse audio files</FormLabel>
|
||||
|
||||
<FormInputGroup
|
||||
type={inputTypes.CHECK}
|
||||
name="enableMediaInfo"
|
||||
helpText="Extract video information such as resolution, runtime and codec information from files. This requires Lidarr to read parts of the file which may cause high disk or network activity during scans."
|
||||
helpText="Extract audio information such as bitrate, runtime and codec information from files. This requires Lidarr to read parts of the file which may cause high disk or network activity during scans."
|
||||
onChange={onInputChange}
|
||||
{...settings.enableMediaInfo}
|
||||
/>
|
||||
|
@ -231,7 +231,7 @@ class MediaManagement extends Component {
|
|||
<FormInputGroup
|
||||
type={inputTypes.PATH}
|
||||
name="recycleBin"
|
||||
helpText="Episode files will go here when deleted instead of being permanently deleted"
|
||||
helpText="Track files will go here when deleted instead of being permanently deleted"
|
||||
onChange={onInputChange}
|
||||
{...settings.recycleBin}
|
||||
/>
|
||||
|
|
|
@ -32,55 +32,29 @@ class Naming extends Component {
|
|||
this.setState({
|
||||
isNamingModalOpen: true,
|
||||
namingModalOptions: {
|
||||
name: 'standardEpisodeFormat',
|
||||
season: true,
|
||||
episode: true,
|
||||
name: 'standardTrackFormat',
|
||||
album: true,
|
||||
track: true,
|
||||
additional: true
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
onDailyNamingModalOpenClick = () => {
|
||||
onArtistFolderNamingModalOpenClick = () => {
|
||||
this.setState({
|
||||
isNamingModalOpen: true,
|
||||
namingModalOptions: {
|
||||
name: 'dailyEpisodeFormat',
|
||||
season: true,
|
||||
episode: true,
|
||||
daily: true,
|
||||
additional: true
|
||||
name: 'artistFolderFormat'
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
onAnimeNamingModalOpenClick = () => {
|
||||
onAlbumFolderNamingModalOpenClick = () => {
|
||||
this.setState({
|
||||
isNamingModalOpen: true,
|
||||
namingModalOptions: {
|
||||
name: 'animeEpisodeFormat',
|
||||
season: true,
|
||||
episode: true,
|
||||
anime: true,
|
||||
additional: true
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
onSeriesFolderNamingModalOpenClick = () => {
|
||||
this.setState({
|
||||
isNamingModalOpen: true,
|
||||
namingModalOptions: {
|
||||
name: 'seriesFolderFormat'
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
onSeasonFolderNamingModalOpenClick = () => {
|
||||
this.setState({
|
||||
isNamingModalOpen: true,
|
||||
namingModalOptions: {
|
||||
name: 'seasonFolderFormat',
|
||||
season: true
|
||||
name: 'albumFolderFormat',
|
||||
album: true
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -109,69 +83,56 @@ class Naming extends Component {
|
|||
namingModalOptions
|
||||
} = this.state;
|
||||
|
||||
const renameEpisodes = hasSettings && settings.renameEpisodes.value;
|
||||
const renameTracks = hasSettings && settings.renameTracks.value;
|
||||
|
||||
const multiEpisodeStyleOptions = [
|
||||
{ key: 0, value: 'Extend' },
|
||||
{ key: 1, value: 'Duplicate' },
|
||||
{ key: 2, value: 'Repeat' },
|
||||
{ key: 3, value: 'Scene' },
|
||||
{ key: 4, value: 'Range' },
|
||||
{ key: 5, value: 'Prefixed Range' }
|
||||
];
|
||||
|
||||
const standardEpisodeFormatHelpTexts = [];
|
||||
const standardEpisodeFormatErrors = [];
|
||||
const dailyEpisodeFormatHelpTexts = [];
|
||||
const dailyEpisodeFormatErrors = [];
|
||||
const animeEpisodeFormatHelpTexts = [];
|
||||
const animeEpisodeFormatErrors = [];
|
||||
const seriesFolderFormatHelpTexts = [];
|
||||
const seriesFolderFormatErrors = [];
|
||||
const seasonFolderFormatHelpTexts = [];
|
||||
const seasonFolderFormatErrors = [];
|
||||
const standardTrackFormatHelpTexts = [];
|
||||
const standardTrackFormatErrors = [];
|
||||
const artistFolderFormatHelpTexts = [];
|
||||
const artistFolderFormatErrors = [];
|
||||
const albumFolderFormatHelpTexts = [];
|
||||
const albumFolderFormatErrors = [];
|
||||
|
||||
if (examplesPopulated) {
|
||||
if (examples.singleEpisodeExample) {
|
||||
standardEpisodeFormatHelpTexts.push(`Single Episode: ${examples.singleEpisodeExample}`);
|
||||
if (examples.singleTrackExample) {
|
||||
standardTrackFormatHelpTexts.push(`Single Track: ${examples.singleTrackExample}`);
|
||||
} else {
|
||||
standardEpisodeFormatErrors.push('Single Episode: Invalid Format');
|
||||
standardTrackFormatErrors.push('Single Track: Invalid Format');
|
||||
}
|
||||
|
||||
if (examples.multiEpisodeExample) {
|
||||
standardEpisodeFormatHelpTexts.push(`Multi Episode: ${examples.multiEpisodeExample}`);
|
||||
// if (examples.multiEpisodeExample) {
|
||||
// standardTrackFormatHelpTexts.push(`Multi Episode: ${examples.multiEpisodeExample}`);
|
||||
// } else {
|
||||
// standardTrackFormatErrors.push('Multi Episode: Invalid Format');
|
||||
// }
|
||||
|
||||
// if (examples.dailyEpisodeExample) {
|
||||
// dailyEpisodeFormatHelpTexts.push(`Example: ${examples.dailyEpisodeExample}`);
|
||||
// } else {
|
||||
// dailyEpisodeFormatErrors.push('Invalid Format');
|
||||
// }
|
||||
|
||||
// if (examples.animeEpisodeExample) {
|
||||
// animeEpisodeFormatHelpTexts.push(`Single Episode: ${examples.animeEpisodeExample}`);
|
||||
// } else {
|
||||
// animeEpisodeFormatErrors.push('Single Episode: Invalid Format');
|
||||
// }
|
||||
|
||||
// if (examples.animeMultiEpisodeExample) {
|
||||
// animeEpisodeFormatHelpTexts.push(`Multi Episode: ${examples.animeMultiEpisodeExample}`);
|
||||
// } else {
|
||||
// animeEpisodeFormatErrors.push('Multi Episode: Invalid Format');
|
||||
// }
|
||||
|
||||
if (examples.artistFolderExample) {
|
||||
artistFolderFormatHelpTexts.push(`Example: ${examples.artistFolderExample}`);
|
||||
} else {
|
||||
standardEpisodeFormatErrors.push('Multi Episode: Invalid Format');
|
||||
artistFolderFormatErrors.push('Invalid Format');
|
||||
}
|
||||
|
||||
if (examples.dailyEpisodeExample) {
|
||||
dailyEpisodeFormatHelpTexts.push(`Example: ${examples.dailyEpisodeExample}`);
|
||||
if (examples.albumFolderExample) {
|
||||
albumFolderFormatHelpTexts.push(`Example: ${examples.albumFolderExample}`);
|
||||
} else {
|
||||
dailyEpisodeFormatErrors.push('Invalid Format');
|
||||
}
|
||||
|
||||
if (examples.animeEpisodeExample) {
|
||||
animeEpisodeFormatHelpTexts.push(`Single Episode: ${examples.animeEpisodeExample}`);
|
||||
} else {
|
||||
animeEpisodeFormatErrors.push('Single Episode: Invalid Format');
|
||||
}
|
||||
|
||||
if (examples.animeMultiEpisodeExample) {
|
||||
animeEpisodeFormatHelpTexts.push(`Multi Episode: ${examples.animeMultiEpisodeExample}`);
|
||||
} else {
|
||||
animeEpisodeFormatErrors.push('Multi Episode: Invalid Format');
|
||||
}
|
||||
|
||||
if (examples.seriesFolderExample) {
|
||||
seriesFolderFormatHelpTexts.push(`Example: ${examples.seriesFolderExample}`);
|
||||
} else {
|
||||
seriesFolderFormatErrors.push('Invalid Format');
|
||||
}
|
||||
|
||||
if (examples.seasonFolderExample) {
|
||||
seasonFolderFormatHelpTexts.push(`Example: ${examples.seasonFolderExample}`);
|
||||
} else {
|
||||
seasonFolderFormatErrors.push('Invalid Format');
|
||||
albumFolderFormatErrors.push('Invalid Format');
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -217,52 +178,23 @@ class Naming extends Component {
|
|||
</FormGroup>
|
||||
|
||||
{
|
||||
renameEpisodes &&
|
||||
renameTracks &&
|
||||
<div>
|
||||
<FormGroup size={sizes.LARGE}>
|
||||
<FormLabel>Standard Episode Format</FormLabel>
|
||||
<FormLabel>Standard Track Format</FormLabel>
|
||||
|
||||
<FormInputGroup
|
||||
inputClassName={styles.namingInput}
|
||||
type={inputTypes.TEXT}
|
||||
name="standardEpisodeFormat"
|
||||
name="standardTrackFormat"
|
||||
buttons={<FormInputButton onPress={this.onStandardNamingModalOpenClick}>?</FormInputButton>}
|
||||
onChange={onInputChange}
|
||||
{...settings.standardEpisodeFormat}
|
||||
helpTexts={standardEpisodeFormatHelpTexts}
|
||||
errors={[...standardEpisodeFormatErrors, ...settings.standardEpisodeFormat.errors]}
|
||||
{...settings.standardTrackFormat}
|
||||
helpTexts={standardTrackFormatHelpTexts}
|
||||
errors={[...standardTrackFormatErrors, ...settings.standardTrackFormat.errors]}
|
||||
/>
|
||||
</FormGroup>
|
||||
|
||||
<FormGroup size={sizes.LARGE}>
|
||||
<FormLabel>Daily Episode Format</FormLabel>
|
||||
|
||||
<FormInputGroup
|
||||
inputClassName={styles.namingInput}
|
||||
type={inputTypes.TEXT}
|
||||
name="dailyEpisodeFormat"
|
||||
buttons={<FormInputButton onPress={this.onDailyNamingModalOpenClick}>?</FormInputButton>}
|
||||
onChange={onInputChange}
|
||||
{...settings.dailyEpisodeFormat}
|
||||
helpTexts={dailyEpisodeFormatHelpTexts}
|
||||
errors={[...dailyEpisodeFormatErrors, ...settings.dailyEpisodeFormat.errors]}
|
||||
/>
|
||||
</FormGroup>
|
||||
|
||||
<FormGroup size={sizes.LARGE}>
|
||||
<FormLabel>Anime Episode Format</FormLabel>
|
||||
|
||||
<FormInputGroup
|
||||
inputClassName={styles.namingInput}
|
||||
type={inputTypes.TEXT}
|
||||
name="animeEpisodeFormat"
|
||||
buttons={<FormInputButton onPress={this.onAnimeNamingModalOpenClick}>?</FormInputButton>}
|
||||
onChange={onInputChange}
|
||||
{...settings.animeEpisodeFormat}
|
||||
helpTexts={animeEpisodeFormatHelpTexts}
|
||||
errors={[...animeEpisodeFormatErrors, ...settings.animeEpisodeFormat.errors]}
|
||||
/>
|
||||
</FormGroup>
|
||||
</div>
|
||||
}
|
||||
|
||||
|
@ -270,45 +202,32 @@ class Naming extends Component {
|
|||
advancedSettings={advancedSettings}
|
||||
isAdvanced={true}
|
||||
>
|
||||
<FormLabel>Series Folder Format</FormLabel>
|
||||
<FormLabel>Artist Folder Format</FormLabel>
|
||||
|
||||
<FormInputGroup
|
||||
inputClassName={styles.namingInput}
|
||||
type={inputTypes.TEXT}
|
||||
name="seriesFolderFormat"
|
||||
buttons={<FormInputButton onPress={this.onSeriesFolderNamingModalOpenClick}>?</FormInputButton>}
|
||||
name="artistFolderFormat"
|
||||
buttons={<FormInputButton onPress={this.onArtistFolderNamingModalOpenClick}>?</FormInputButton>}
|
||||
onChange={onInputChange}
|
||||
{...settings.seriesFolderFormat}
|
||||
helpTexts={['Only used when adding a new series', ...seriesFolderFormatHelpTexts]}
|
||||
errors={[...seriesFolderFormatErrors, ...settings.seriesFolderFormat.errors]}
|
||||
{...settings.artistFolderFormat}
|
||||
helpTexts={['Only used when adding a new artist', ...artistFolderFormatHelpTexts]}
|
||||
errors={[...artistFolderFormatErrors, ...settings.artistFolderFormat.errors]}
|
||||
/>
|
||||
</FormGroup>
|
||||
|
||||
<FormGroup>
|
||||
<FormLabel>Season Folder Format</FormLabel>
|
||||
<FormLabel>Album Folder Format</FormLabel>
|
||||
|
||||
<FormInputGroup
|
||||
inputClassName={styles.namingInput}
|
||||
type={inputTypes.TEXT}
|
||||
name="seasonFolderFormat"
|
||||
buttons={<FormInputButton onPress={this.onSeasonFolderNamingModalOpenClick}>?</FormInputButton>}
|
||||
name="albumFolderFormat"
|
||||
buttons={<FormInputButton onPress={this.onAlbumFolderNamingModalOpenClick}>?</FormInputButton>}
|
||||
onChange={onInputChange}
|
||||
{...settings.seasonFolderFormat}
|
||||
helpTexts={seasonFolderFormatHelpTexts}
|
||||
errors={[...seasonFolderFormatErrors, ...settings.seasonFolderFormat.errors]}
|
||||
/>
|
||||
</FormGroup>
|
||||
|
||||
<FormGroup>
|
||||
<FormLabel>Multi-Episode Style</FormLabel>
|
||||
|
||||
<FormInputGroup
|
||||
type={inputTypes.SELECT}
|
||||
name="multiEpisodeStyle"
|
||||
helpText="Change file date on import/rescan"
|
||||
values={multiEpisodeStyleOptions}
|
||||
onChange={onInputChange}
|
||||
{...settings.multiEpisodeStyle}
|
||||
{...settings.albumFolderFormat}
|
||||
helpTexts={albumFolderFormatHelpTexts}
|
||||
errors={[...albumFolderFormatErrors, ...settings.albumFolderFormat.errors]}
|
||||
/>
|
||||
</FormGroup>
|
||||
|
||||
|
|
|
@ -42,10 +42,8 @@ class NamingModal extends Component {
|
|||
value,
|
||||
isOpen,
|
||||
advancedSettings,
|
||||
season,
|
||||
episode,
|
||||
daily,
|
||||
anime,
|
||||
album,
|
||||
track,
|
||||
additional,
|
||||
onInputChange,
|
||||
onModalClose
|
||||
|
@ -59,61 +57,55 @@ class NamingModal extends Component {
|
|||
|
||||
const fileNameTokens = [
|
||||
{
|
||||
token: '{Series Title} - S{season:00}E{episode:00} - {Episode Title} {Quality Full}',
|
||||
example: 'Series Title (2010) - S01E01 - Episode Title HDTV-720p Proper'
|
||||
token: '{Artist Name} - {Album Title} - {track:00} - {Track Title} {Quality Full}',
|
||||
example: 'Artist Name - Album Title - 01 - Track Title MP3-320 Proper'
|
||||
},
|
||||
{
|
||||
token: '{Series Title} - {season:0}x{episode:00} - {Episode Title} {Quality Full}',
|
||||
example: 'Series Title (2010) - 1x01 - Episode Title HDTV-720p Proper'
|
||||
},
|
||||
{
|
||||
token: '{Series.Title}.S{season:00}E{episode:00}.{EpisodeClean.Title}.{Quality.Full}',
|
||||
example: 'Series.Title.(2010).S01E01.Episode.Title.HDTV-720p'
|
||||
token: '{Artist.Name}.{Album.Title}.{track:00}.{TrackClean.Title}.{Quality.Full}',
|
||||
example: 'Artist.Name.Album.Title.01.Track.Title.MP3-320'
|
||||
}
|
||||
];
|
||||
|
||||
const seriesTokens = [
|
||||
{ token: '{Series Title}', example: 'Series Title (2010)' },
|
||||
{ token: '{Series.Title}', example: 'Series.Title.(2010)' },
|
||||
{ token: '{Series_Title}', example: 'Series_Title_(2010)' },
|
||||
const artistTokens = [
|
||||
{ token: '{Artist Name}', example: 'Artist Name' },
|
||||
{ token: '{Artist.Name}', example: 'Artist.Name' },
|
||||
{ token: '{Artist_Name}', example: 'Artist_Name' },
|
||||
|
||||
{ token: '{Series TitleThe}', example: 'Series Title, The (2010)' },
|
||||
{ token: '{Artist NameThe}', example: 'Artist Name, The' },
|
||||
|
||||
{ token: '{Series CleanTitle}', example: 'Series Title 2010' },
|
||||
{ token: '{Series.CleanTitle}', example: 'Series.Title.2010' },
|
||||
{ token: '{Series_CleanTitle}', example: 'Series_Title_2010' }
|
||||
{ token: '{Artist CleanName}', example: 'Artist Name' },
|
||||
{ token: '{Artist.CleanName}', example: 'Artist.Name' },
|
||||
{ token: '{Artist_CleanName}', example: 'Artist_Name' }
|
||||
];
|
||||
|
||||
const seasonTokens = [
|
||||
{ token: '{season:0}', example: '1' },
|
||||
{ token: '{season:00}', example: '01' }
|
||||
const albumTokens = [
|
||||
{ token: '{Album Title}', example: 'Album Title' },
|
||||
{ token: '{Album.Title}', example: 'Album.Title' },
|
||||
{ token: '{Album_Name}', example: 'Album_Name' },
|
||||
|
||||
{ token: '{Album TitleThe}', example: 'Album Title, The' },
|
||||
|
||||
{ token: '{Album CleanTitle}', example: 'Album Title' },
|
||||
{ token: '{Album.CleanTitle}', example: 'Album.Title' },
|
||||
{ token: '{Album_CleanTitle}', example: 'Album_Title' }
|
||||
];
|
||||
|
||||
const episodeTokens = [
|
||||
{ token: '{episode:0}', example: '1' },
|
||||
{ token: '{episode:00}', example: '01' }
|
||||
const trackTokens = [
|
||||
{ token: '{track:0}', example: '1' },
|
||||
{ token: '{track:00}', example: '01' }
|
||||
];
|
||||
|
||||
const airDateTokens = [
|
||||
{ token: '{Air-Date}', example: '2016-03-20' },
|
||||
{ token: '{Air Date}', example: '2016 03 20' },
|
||||
{ token: '{Air.Date}', example: '2016.03.20' },
|
||||
{ token: '{Air_Date}', example: '2016_03_20' }
|
||||
const releaseDateTokens = [
|
||||
{ token: '{Release Year}', example: '2016' }
|
||||
];
|
||||
|
||||
const absoluteTokens = [
|
||||
{ token: '{absolute:0}', example: '1' },
|
||||
{ token: '{absolute:00}', example: '01' },
|
||||
{ token: '{absolute:000}', example: '001' }
|
||||
];
|
||||
|
||||
const episodeTitleTokens = [
|
||||
{ token: '{Episode Title}', example: 'Episode Title' },
|
||||
{ token: '{Episode.Title}', example: 'Episode.Title' },
|
||||
{ token: '{Episode_Title}', example: 'Episode_Title' },
|
||||
{ token: '{Episode CleanTitle}', example: 'Episode Title' },
|
||||
{ token: '{Episode.CleanTitle}', example: 'Episode.Title' },
|
||||
{ token: '{Episode_CleanTitle}', example: 'Episode_Title' }
|
||||
const trackTitleTokens = [
|
||||
{ token: '{Track Title}', example: 'Track Title' },
|
||||
{ token: '{Track.Title}', example: 'Track.Title' },
|
||||
{ token: '{Track_Title}', example: 'Track_Title' },
|
||||
{ token: '{Track CleanTitle}', example: 'Track Title' },
|
||||
{ token: '{Track.CleanTitle}', example: 'Track.Title' },
|
||||
{ token: '{Track_CleanTitle}', example: 'Track_Title' }
|
||||
];
|
||||
|
||||
const qualityTokens = [
|
||||
|
@ -146,8 +138,8 @@ class NamingModal extends Component {
|
|||
];
|
||||
|
||||
const originalTokens = [
|
||||
{ token: '{Original Title}', example: 'Series.Title.S01E01.HDTV.x264-EVOLVE' },
|
||||
{ token: '{Original Filename}', example: 'series.title.s01e01.hdtv.x264-EVOLVE' }
|
||||
{ token: '{Original Title}', example: 'Artist.Name.S01E01.HDTV.x264-EVOLVE' },
|
||||
{ token: '{Original Filename}', example: 'artist.name.s01e01.hdtv.x264-EVOLVE' }
|
||||
];
|
||||
|
||||
return (
|
||||
|
@ -197,10 +189,10 @@ class NamingModal extends Component {
|
|||
</FieldSet>
|
||||
}
|
||||
|
||||
<FieldSet legend="Series">
|
||||
<FieldSet legend="Artist">
|
||||
<div className={styles.groups}>
|
||||
{
|
||||
seriesTokens.map(({ token, example }) => {
|
||||
artistTokens.map(({ token, example }) => {
|
||||
return (
|
||||
<NamingOption
|
||||
key={token}
|
||||
|
@ -219,11 +211,12 @@ class NamingModal extends Component {
|
|||
</FieldSet>
|
||||
|
||||
{
|
||||
season &&
|
||||
<FieldSet legend="Season">
|
||||
<div className={styles.groups}>
|
||||
album &&
|
||||
<div>
|
||||
<FieldSet legend="Album">
|
||||
<div className={styles.groups}>
|
||||
{
|
||||
seasonTokens.map(({ token, example }) => {
|
||||
albumTokens.map(({ token, example }) => {
|
||||
return (
|
||||
<NamingOption
|
||||
key={token}
|
||||
|
@ -238,17 +231,39 @@ class NamingModal extends Component {
|
|||
}
|
||||
)
|
||||
}
|
||||
</div>
|
||||
</FieldSet>
|
||||
</div>
|
||||
</FieldSet>
|
||||
|
||||
<FieldSet legend="Release Date">
|
||||
<div className={styles.groups}>
|
||||
{
|
||||
releaseDateTokens.map(({ token, example }) => {
|
||||
return (
|
||||
<NamingOption
|
||||
key={token}
|
||||
name={name}
|
||||
value={value}
|
||||
token={token}
|
||||
example={example}
|
||||
tokenCase={this.state.case}
|
||||
onInputChange={onInputChange}
|
||||
/>
|
||||
);
|
||||
}
|
||||
)
|
||||
}
|
||||
</div>
|
||||
</FieldSet>
|
||||
</div>
|
||||
}
|
||||
|
||||
{
|
||||
episode &&
|
||||
track &&
|
||||
<div>
|
||||
<FieldSet legend="Episode">
|
||||
<FieldSet legend="Track">
|
||||
<div className={styles.groups}>
|
||||
{
|
||||
episodeTokens.map(({ token, example }) => {
|
||||
trackTokens.map(({ token, example }) => {
|
||||
return (
|
||||
<NamingOption
|
||||
key={token}
|
||||
|
@ -266,63 +281,16 @@ class NamingModal extends Component {
|
|||
</div>
|
||||
</FieldSet>
|
||||
|
||||
{
|
||||
daily &&
|
||||
<FieldSet legend="Air-Date">
|
||||
<div className={styles.groups}>
|
||||
{
|
||||
airDateTokens.map(({ token, example }) => {
|
||||
return (
|
||||
<NamingOption
|
||||
key={token}
|
||||
name={name}
|
||||
value={value}
|
||||
token={token}
|
||||
example={example}
|
||||
tokenCase={this.state.case}
|
||||
onInputChange={onInputChange}
|
||||
/>
|
||||
);
|
||||
}
|
||||
)
|
||||
}
|
||||
</div>
|
||||
</FieldSet>
|
||||
}
|
||||
|
||||
{
|
||||
anime &&
|
||||
<FieldSet legend="Absolute Episode Number">
|
||||
<div className={styles.groups}>
|
||||
{
|
||||
absoluteTokens.map(({ token, example }) => {
|
||||
return (
|
||||
<NamingOption
|
||||
key={token}
|
||||
name={name}
|
||||
value={value}
|
||||
token={token}
|
||||
example={example}
|
||||
tokenCase={this.state.case}
|
||||
onInputChange={onInputChange}
|
||||
/>
|
||||
);
|
||||
}
|
||||
)
|
||||
}
|
||||
</div>
|
||||
</FieldSet>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
|
||||
{
|
||||
additional &&
|
||||
<div>
|
||||
<FieldSet legend="Episode Title">
|
||||
<FieldSet legend="Track Title">
|
||||
<div className={styles.groups}>
|
||||
{
|
||||
episodeTitleTokens.map(({ token, example }) => {
|
||||
trackTitleTokens.map(({ token, example }) => {
|
||||
return (
|
||||
<NamingOption
|
||||
key={token}
|
||||
|
@ -449,20 +417,16 @@ NamingModal.propTypes = {
|
|||
value: PropTypes.string.isRequired,
|
||||
isOpen: PropTypes.bool.isRequired,
|
||||
advancedSettings: PropTypes.bool.isRequired,
|
||||
season: PropTypes.bool.isRequired,
|
||||
episode: PropTypes.bool.isRequired,
|
||||
daily: PropTypes.bool.isRequired,
|
||||
anime: PropTypes.bool.isRequired,
|
||||
album: PropTypes.bool.isRequired,
|
||||
track: PropTypes.bool.isRequired,
|
||||
additional: PropTypes.bool.isRequired,
|
||||
onInputChange: PropTypes.func.isRequired,
|
||||
onModalClose: PropTypes.func.isRequired
|
||||
};
|
||||
|
||||
NamingModal.defaultProps = {
|
||||
season: false,
|
||||
episode: false,
|
||||
daily: false,
|
||||
anime: false,
|
||||
album: false,
|
||||
track: false,
|
||||
additional: false
|
||||
};
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@ class QualityDefinitions extends Component {
|
|||
|
||||
<div className={styles.sizeLimitHelpTextContainer}>
|
||||
<div className={styles.sizeLimitHelpText}>
|
||||
Limits are automatically adjusted for the series runtime and number of episodes in the file.
|
||||
Limits are automatically adjusted for the album duration.
|
||||
</div>
|
||||
</div>
|
||||
</PageSectionContent>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue