mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-15 01:23:53 -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
|
@ -10,7 +10,7 @@ import ModalBody from 'Components/Modal/ModalBody';
|
||||||
import ModalContent from 'Components/Modal/ModalContent';
|
import ModalContent from 'Components/Modal/ModalContent';
|
||||||
import ModalFooter from 'Components/Modal/ModalFooter';
|
import ModalFooter from 'Components/Modal/ModalFooter';
|
||||||
import ModalHeader from 'Components/Modal/ModalHeader';
|
import ModalHeader from 'Components/Modal/ModalHeader';
|
||||||
import { inputTypes } from 'Helpers/Props';
|
import { inputTypes, sizes } from 'Helpers/Props';
|
||||||
import translate from 'Utilities/String/translate';
|
import translate from 'Utilities/String/translate';
|
||||||
|
|
||||||
class EditAlbumModalContent extends Component {
|
class EditAlbumModalContent extends Component {
|
||||||
|
@ -59,7 +59,7 @@ class EditAlbumModalContent extends Component {
|
||||||
<Form
|
<Form
|
||||||
{...otherProps}
|
{...otherProps}
|
||||||
>
|
>
|
||||||
<FormGroup>
|
<FormGroup size={sizes.MEDIUM}>
|
||||||
<FormLabel>
|
<FormLabel>
|
||||||
{translate('Monitored')}
|
{translate('Monitored')}
|
||||||
</FormLabel>
|
</FormLabel>
|
||||||
|
@ -73,7 +73,7 @@ class EditAlbumModalContent extends Component {
|
||||||
/>
|
/>
|
||||||
</FormGroup>
|
</FormGroup>
|
||||||
|
|
||||||
<FormGroup>
|
<FormGroup size={sizes.MEDIUM}>
|
||||||
<FormLabel>
|
<FormLabel>
|
||||||
{translate('AutomaticallySwitchRelease')}
|
{translate('AutomaticallySwitchRelease')}
|
||||||
</FormLabel>
|
</FormLabel>
|
||||||
|
@ -87,7 +87,7 @@ class EditAlbumModalContent extends Component {
|
||||||
/>
|
/>
|
||||||
</FormGroup>
|
</FormGroup>
|
||||||
|
|
||||||
<FormGroup>
|
<FormGroup size={sizes.MEDIUM}>
|
||||||
<FormLabel>
|
<FormLabel>
|
||||||
{translate('Release')}
|
{translate('Release')}
|
||||||
</FormLabel>
|
</FormLabel>
|
||||||
|
|
|
@ -13,13 +13,23 @@ function createMapStateToProps() {
|
||||||
(albumReleases) => {
|
(albumReleases) => {
|
||||||
const values = _.map(albumReleases.value, (albumRelease) => {
|
const values = _.map(albumReleases.value, (albumRelease) => {
|
||||||
|
|
||||||
|
const {
|
||||||
|
foreignReleaseId,
|
||||||
|
title,
|
||||||
|
disambiguation,
|
||||||
|
mediumCount,
|
||||||
|
trackCount,
|
||||||
|
country,
|
||||||
|
format
|
||||||
|
} = albumRelease;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
key: albumRelease.foreignReleaseId,
|
key: foreignReleaseId,
|
||||||
value: `${albumRelease.title}` +
|
value: `${title}` +
|
||||||
`${albumRelease.disambiguation ? ' (' : ''}${titleCase(albumRelease.disambiguation)}${albumRelease.disambiguation ? ')' : ''}` +
|
`${disambiguation ? ' (' : ''}${titleCase(disambiguation)}${disambiguation ? ')' : ''}` +
|
||||||
`, ${albumRelease.mediumCount} med, ${albumRelease.trackCount} tracks` +
|
`, ${mediumCount} med, ${trackCount} tracks` +
|
||||||
`${albumRelease.country.length > 0 ? ', ' : ''}${shortenList(albumRelease.country)}` +
|
`${country && country.length > 0 ? `, ${shortenList(country)}` : ''}` +
|
||||||
`${albumRelease.format ? ', [' : ''}${albumRelease.format}${albumRelease.format ? ']' : ''}`
|
`${format ? `, [${format}]` : ''}`
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue