mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-19 13:10:13 -07:00
Fixed ternary condition for country and format in AlbumReleaseSelect
This commit is contained in:
parent
17b32dd076
commit
b71ecc4370
2 changed files with 20 additions and 10 deletions
|
@ -13,13 +13,23 @@ function createMapStateToProps() {
|
|||
(albumReleases) => {
|
||||
const values = _.map(albumReleases.value, (albumRelease) => {
|
||||
|
||||
const {
|
||||
foreignReleaseId,
|
||||
title,
|
||||
disambiguation,
|
||||
mediumCount,
|
||||
trackCount,
|
||||
country,
|
||||
format
|
||||
} = albumRelease;
|
||||
|
||||
return {
|
||||
key: albumRelease.foreignReleaseId,
|
||||
value: `${albumRelease.title}` +
|
||||
`${albumRelease.disambiguation ? ' (' : ''}${titleCase(albumRelease.disambiguation)}${albumRelease.disambiguation ? ')' : ''}` +
|
||||
`, ${albumRelease.mediumCount} med, ${albumRelease.trackCount} tracks` +
|
||||
`${albumRelease.country.length > 0 ? ', ' : ''}${shortenList(albumRelease.country)}` +
|
||||
`${albumRelease.format ? ', [' : ''}${albumRelease.format}${albumRelease.format ? ']' : ''}`
|
||||
key: foreignReleaseId,
|
||||
value: `${title}` +
|
||||
`${disambiguation ? ' (' : ''}${titleCase(disambiguation)}${disambiguation ? ')' : ''}` +
|
||||
`, ${mediumCount} med, ${trackCount} tracks` +
|
||||
`${country && country.length > 0 ? `, ${shortenList(country)}` : ''}` +
|
||||
`${format ? `, [${format}]` : ''}`
|
||||
};
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue