New: Token for track artist (as opposed to album artist) (#1910)

* New: Token for track artist (as opposed to album artist)

* - Move logic to AddTrackTokens instead of separate AddTrackArtistTokens method
- Just use the first artist name

* Update FIleNameSampleService to handle this token properly

* Fall back to album artist if there's no track artist

* Show tokens in naming modal
This commit is contained in:
Daniel Lo Nigro 2021-04-16 04:22:36 -07:00 committed by GitHub
parent f50556d4d5
commit 187672b183
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 95 additions and 7 deletions

View file

@ -82,6 +82,12 @@ const trackTitleTokens = [
{ token: '{Track CleanTitle}', example: 'Track Title' }
];
const trackArtistTokens = [
{ token: '{Track ArtistName}', example: 'Artist Name' },
{ token: '{Track ArtistNameThe}', example: 'Artist Name, The' },
{ token: '{Track ArtistCleanName}', example: 'Artist Name' }
];
const qualityTokens = [
{ token: '{Quality Full}', example: 'FLAC Proper' },
{ token: '{Quality Title}', example: 'FLAC' }
@ -411,6 +417,28 @@ class NamingModal extends Component {
</div>
</FieldSet>
<FieldSet legend="Track Artist">
<div className={styles.groups}>
{
trackArtistTokens.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}>
{