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

@ -185,7 +185,10 @@ class InteractiveImportRow extends Component {
} = this.state; } = this.state;
const artistName = artist ? artist.artistName : ''; 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}`) const trackNumbers = tracks.map((track) => `${track.mediumNumber}x${track.trackNumber}`)
.join(', '); .join(', ');

Loading…
Cancel
Save