mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-16 10:03:51 -07:00
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:
parent
f50556d4d5
commit
187672b183
4 changed files with 95 additions and 7 deletions
|
@ -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}>
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue