Fixed: show disambiguation in interactive import modal (#576)

pull/6/head
ta264 6 years ago committed by Qstick
parent ef9072fc3b
commit c749405a45

@ -34,6 +34,7 @@ class SelectAlbumRow extends Component {
render() {
const {
title,
disambiguation,
albumType,
releaseDate,
statistics,
@ -47,6 +48,8 @@ class SelectAlbumRow extends Component {
totalTrackCount
} = statistics;
const extendedTitle = disambiguation ? `${title} (${disambiguation})` : title;
return (
<TableRow
onClick={this.onPress}
@ -66,7 +69,7 @@ class SelectAlbumRow extends Component {
if (name === 'title') {
return (
<TableRowCell key={name}>
{title}
{extendedTitle}
</TableRowCell>
);
}
@ -118,6 +121,7 @@ class SelectAlbumRow extends Component {
SelectAlbumRow.propTypes = {
id: PropTypes.number.isRequired,
title: PropTypes.string.isRequired,
disambiguation: PropTypes.string.isRequired,
albumType: PropTypes.string.isRequired,
releaseDate: PropTypes.string.isRequired,
onAlbumSelect: PropTypes.func.isRequired,

@ -185,7 +185,10 @@ class InteractiveImportRow extends Component {
} = this.state;
const artistName = artist ? artist.artistName : '';
const albumTitle = album ? album.title : '';
let albumTitle = '';
if (album) {
albumTitle = album.disambiguation ? `${album.title} (${album.disambiguation})` : album.title;
}
const trackNumbers = tracks.map((track) => `${track.mediumNumber}x${track.trackNumber}`)
.join(', ');

Loading…
Cancel
Save